Source: https://nishanth-fern-test.docs-staging.pageloop.ai/desktop/data-validation-using-smart-tips

# Data Validation using Smart Tips

Use Validation Smart Tips to verify your end user's inputs on form fields in your application. Whatfix enables you to define a valid input format and then evaluate your end user's response. If your end-user input does not match the set format, then Whatfix displays an error message. Validation Smart Tips are real-time feedback that minimizes errors in forms, fields, and more before submitting them.

## Use Cases

You can use validation tips to check whether:

- The end user has filled mandatory fields in a form correctly or not
- Dates are put in a valid date format, for example, dd/mm/yyyy
- Valid entries are made in a numeric field
- The end user has put a valid 10-digit number in the phone number field
- An email or web address is put in a valid format

Use the following steps to enable data validation using Smart Tips:

1. Go to the application where you want to create content, and then launch the Whatfix Desktop Studio.
2. Click **Smart-tip**. ![clm\_studio\_smart tip1](/images/cc/clm_studio_smart-tip-1-cc0f2015.png)
3. Enter a name for the Smart tip Collection. ![Studio\_editor\_enterSTname](/images/ce/Studio_editor_enterSTname-ceffaf55.png)

> [!INFO]
>
> - A Smart Tip Collection is a group of Smart Tips created on the same page of an application.
> - The Smart Tip Collection name is solely for your (Creator's) reference and is not visible to the end user.

1. Click **+ Add Help Tip** to create a new Smart Tip. ![Studio\_ST\_help\_tip.png](/images/3a/Studio_ST_help_tip-3a7045da.png)
2. Click **+ Add validation tip**. ![Studio\_editor\_AddValidationTip](/images/e4/Studio_editor_AddValidationTip-e46abd68.png)
3. Select an element on the application that you would like to add the validation to.
4. In the **Display validation rules** section, click the **+ Add Rule** button. ![Studio\_editor\_STConfig\_ClickAddRule](/images/0f/Studio_editor_STConfig_ClickAddRule-0fdac807.png)
5. To add multiple rules, click the **+ Add Rule** button. ![Studio\_editor\_AddMoreRule](/images/ea/Studio_editor_AddMoreRule-ea235f1d.png)
6. Click **Save Tip**. ![Studio\_editor\_saveTip](/images/ea/Studio_editor_saveTip-ea97df72.png)
7. To add additional data validations, repeat steps 4 to 9.
8. After all the data validation tips are created, click the **Save Tip** button. ![Studio\_editor\_saveSTcollection](/images/4e/Studio_editor_saveSTcollection-4e97f7fd.png)

| **Rule**             | **Description**                                                                                                                                                       |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Numeric**          | Validates whether the user input is numeric or not.                                                                                                                   |
| **Character Length** | Validates the user input based on the set minimum/maximum character length.![Studio\_st\_VT\_character length](/images/a9/Studio_st_VT_character-length-a978a72d.png) |
| **Email Address**    | Validates whether the user input is in an email address format or not.                                                                                                |
| **Web Address**      | Validates whether the user input is in a web address format or not.                                                                                                   |
| **Date Format**      | Validates the user input based on the set date format. ![studio\_st\_vt\_date format](/images/e6/studio_st_vt_date-format-e667cdea.png)                               |

> [!WARNING]
>
> - Whatfix does not capture and store any data during validation, instead Whatfix reads the text and evaluates it using the validation rules in real-time.
> - 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 or language-based error message over-rides need to be handled in the code.
