# It is possible to fill "required" fields only with spaces and still submit the form

**URL:** <https://community.noloco.io/t/it-is-possible-to-fill-required-fields-only-with-spaces-and-still-submit-the-form/2018>\
**Category:** Bugs\
**Created:** [June 28, 2025, 8:09pm UTC](https://community.noloco.io/t/it-is-possible-to-fill-required-fields-only-with-spaces-and-still-submit-the-form/2018 "2025-06-28T20:09:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JCW](https://dub1.discourse-cdn.com/flex005/user_avatar/community.noloco.io/jcw/32/173_2.png) [@JCW](https://community.noloco.io/u/JCW)\
**Post date:** [June 28, 2025, 8:09pm UTC](https://community.noloco.io/t/it-is-possible-to-fill-required-fields-only-with-spaces-and-still-submit-the-form/2018/1 "2025-06-28T20:09:16Z")

</div>

It is currently possible to Submit forms with text fields that are only filled with spaces despite being flagged as mandatory to fill in. I have tried to use a regex expression to avoid that but it will not prevent the user from submitting the form. Also tried to limit the amount of characters via regex to 100 I was able to submit over 100 characters in a text field in a form. I used the following expression:

^(?!\s)(?!._\s$)(?!\s_$).{1,100}$

---

<div class="post-metadata">

**Author:** ![JCW](https://dub1.discourse-cdn.com/flex005/user_avatar/community.noloco.io/jcw/32/173_2.png) [@JCW](https://community.noloco.io/u/JCW)\
**Post date:** [June 29, 2025, 5:30pm UTC](https://community.noloco.io/t/it-is-possible-to-fill-required-fields-only-with-spaces-and-still-submit-the-form/2018/2 "2025-06-29T17:30:38Z")

</div>

Same behaviour when updating a text field later in the record view.

---

<div class="post-metadata">

**Author:** ![JCW](https://dub1.discourse-cdn.com/flex005/user_avatar/community.noloco.io/jcw/32/173_2.png) [@JCW](https://community.noloco.io/u/JCW)\
**Post date:** [July 9, 2025, 9:59am UTC](https://community.noloco.io/t/it-is-possible-to-fill-required-fields-only-with-spaces-and-still-submit-the-form/2018/3 "2025-07-09T09:59:01Z")

</div>

Seperating the restrictions into seperate rules helped. Also simplified the regex to \[1\].+[^\s]$ and it works.

* * *

1. ^\s
