I have a textField that I do not want users to be able to enter in a space unless it is a part of the case number.
For example, users should not be able to enter this:
But if there are spaces in the case number, then it should be allowed
I've tried regexmatch, I've tried a if / isnullorempty statement
example:
if( a!isNullOrEmpty(ri!notice), "Case Number is invalid.", null() )
Discussion posts and replies are publicly visible
trim your input at save time.
a!textField( label: "notice", value: ri!notice, saveInto: a!save(ri!notice, trim(save!value)) )
Im looking to also display an error message if there is empty spaces :(
You can only display an error message when a string is entered. So you can choose either to trim the input (thus not allowing only blank space to be entered), or you can use a validation that shows up when removing all blanks would result in a null.
validations: { if( a!isNullOrEmpty(trim(ri!notice)), "don't enter only blank spaces", null() )}