In Cognito Forms, you can use the Custom Error option to display custom error messages. For example, you can display an error message when two Email fields do not contain matching addresses:
Add an Email field labeled “Email” and another Email field labeled “Confirm Email”.
Select the Confirm Email field and find the Show Custom Error - When option in the field settings.
Set an error to display when the two Email field values do not match:
Click Save to close the conditional logic dialog.
Enter the error message you wish to show when this error occurs (ex: “Email addresses don’t match.”)
Now, when a user tries to enter a different value into the second email field, they’ll see your custom error message.