Skip to main content
New Participant
Nov 9, 2021 12:25 PM UTC
Question

A text field considering space as an data .

A text field is considered space as a data so how to resolve it so that it wouldn't submit untill the actual data is inserted.

4 replies

stefanhelzle0001
Brainy
Nov 9, 2021 12:28 PM UTC

In Appian we typically use validations on text fields to make sure the entered text is valid.

Example: docs.appian.com/.../recipe-add-multiple-validation-rules-to-one-component.html

New Participant
Nov 9, 2021 12:33 PM UTC

Thankyou

stewart.burchell
Employee
Nov 9, 2021 12:29 PM UTC

I assume you've made your text field "required" but that someone is entering a space which is being considered to be data and thus allowing the user to submit the form? The easiest way to think about this is to think about what would the content of your field be if all the spaces were removed. If the length of the resulting value is 0 (i.e it only contains spaces) then you can use this information to throw a validation error, which will then prevent the user form submitting the form.

New Participant
Nov 9, 2021 12:32 PM UTC

Ok thankyou