Top
Data Validation using Smart Tips
  • 1 minute to read
  • Print
  • Dark
    Light

Data Validation using Smart Tips

  • Print
  • Dark
    Light

Smart Tips can help you validate user input. If the user input has to be in a particular format and the data that is entered is not compliant, Whatfix allows you to trigger a message that gives real-time feedback on the information entered before the form is submitted. The validation feature can be used along with or without displaying a smart tip.

Example:

Smart Tip on a Phone Number field that displays an error message when the value is not numeric and not exactly 10 characters.

error_message_preview.gif.png

To add data validation using Smart Tips,

  1. On the Whatfix editor, click Smart Tips.
    click_smarttips1.png

  2. Enter a name for the Smart Tip Collection.

Note
The collection name is not visible to the end user and is only for the author's reference.

enter_smarttip_name.png

  1. Click the + Tip button.
    click_plustip.png

  2. Select an element on the application that you would like to add the Validation to.
    select_element.png

  3. Select Only Validation
    only_validation.png

Note
To display Help Tip + Data Validation, select Help Tip > Advanced Options, and set the validation rules. This displays the help tip and validates the data entered.
  1. Select the Data Validation Rules.  
    set_rule_numeric.png

  2. To add multiple rules, click the plus icon. 
    plus_icon.png

  3. Enter the error message that is to be displayed if the validation fails.

Note
The error message appears only when an incorrect value is entered.

error_message.png

  1. Click Add Tip
    add_tip.png

  2. To add additional data validations, click + Tip on the editorand repeat the steps 4 to 8.
    plustip_editor.png

  3. After all the data validation tips are created, click Maximize on the Whatfix toolbar.
    click_maximize.png

  4. Click the Save button.
    click_save.png

Custom validation requirements can now be handled via the Validation API.

  • Signature of the API is :
    function onValidate ( event )

Contact your CSM or Account executive for more details about the Validation API.

Note
  • The validations can additionally have multiple rules with AND/ OR Conditions between them.
  • An error message is mandatory if validation rules are configured.
  • The validation does not work when no data is entered in the text box. 
  • API validation within the scope of an iFrame is NOT supported.
  • Locale/language based error message over-rides need to be handled in the code.
Was this article helpful?