Let’s take a look at how to do that with a text field that is only supposed to have a value of either ‘AAAA’ or ‘BBBB’ (yes, I know that this does not make much sense in a real PDF form).
So, if the user enters ‘01234’ we should see an error message that would instruct the user about what type of data is valid for this field.
is Valid Form Submitted" [ng Class] = "'error'"> Name required.
To start, we create a text field and bring up the properties dialog for the field.
Then we select the “Validate” tab to see the validation options: The default is that the field will not get validated.
If you find you need more restrictive validations for these fields, you can use the attribute to further constrain what's acceptable.
Be careful that you aren't too restrictive though, which might lead to false negatives and a poor user experience.