I have a need to have field validation on single line text fields that includes the following:
- Regular expression for matching the format
- Masks using the JavaScript library as described in the Laserfiche documentation
- Custom validation like calculating the check digit on special identifiers using JavaScript functions in the form
I have all of these working successfully for two different identifiers. However, there is a reasonable order for these and I would like the error messages to report in the same manner and consistently.
An invalid field format can be reported under the field with a standard message on format.
An invalid identifier needs a longer message: "Check your record to make sure you have entered the value correctly." (The check digit failed validation.)
I am finding the execution of the check digit validation is running several times for a field when there are two fields next to each other on the form. How do I make sure that the check digit validation is run only after all other validation using the mask and length is satisfied? (Lost focus is probably the right time to fire check digit validation.?)
All these fields are required fields. How do I have this final test integrated into the standard validation for the field and show the check digit message and prevent form submission?
There are snippets of parts of this in other posts but no answers that addresses the stages of validation and the full integration of all these validations in the standard message and field validation state for form submissions.
There really should be an in-depth document on advanced form development that answers these questions with examples.
Help!