Best Practices for Validations

Once you've learned how to create validations, you can now learn about strategies and methods we have found to be most effective for validating the data in your underlying application.

Create a Frame

Frame page is the unique part of the page on which the validations/Launchers/ToolTips/Announcements act upon. The Frame must be given a valid name and it must be uniquely identified and where Anchor points are involved.

When "Show icon" checkbox is checked the validation icon is visible beside the field. Otherwise, it is hidden until the field is used.

Icon position can be adjusted beside the Spotlight by the spacing between the field and the validation icon.

Four categories of custom Validators are available to make sure that the user inputs valid data. 

  • Required Field
  • Length Constraint

  • Regular Expression

  • Custom Validator

Required Field

If a Required Field Validator is selected, the user is required to enter data.

Length Constraint

If length constraint is selected, we can specify the conditions for the length of the input that must be entered in the field.

Regular Expression

If the Regular Expression Validator type is selected, A regular expression that specifies the format of acceptable input must be given in the space opened. The specified regex gets applied to the spotlight.

Once the validation is applied to the spotlight, The acceptance of Regex by the spotlight can be observed below:

Custom Validator

If the input format to be accepted by the spotlight involves more number of conditions or dependencies with the other fields, then Custom Validator can be chosen. Custom Validator provides a way to write custom JavaScript to validate the input.

After choosing the Validator and providing required information, click Save.