Articles on: Working with OpnForm

How to add custom validation to a field?

Custom validation helps you make sure form submissions meet your specific rules — ensuring cleaner, more reliable data.


For example, you can use it to:

  • Make sure an email ends with @company.com for internal submissions.
  • Require a response to include a certain keyword or phrase.
  • Limit how short or long an answer can be.


This is especially useful for company forms, access requests, or workflows that require strict input rules.


To add custom validation to a field in your form, follow these steps:


  1. Log in to your account and access the forms section.
  2. Locate the specific form you want to edit and click on it.
  3. Find the field that requires custom validation and click on the settings icon.
  4. Click on the validation tab from the right side of the screen.
  5. Choose the desired validation criteria from options like equals, does not equal, contains, does not contain, starts with, ends with, is empty, is not empty, content length equals, content length does not equal, content length greater than, content length greater than or equal to, content length less than, and content length less than or equal to.
  6. Configure the conditions based on the criteria you selected.

💡 Example: To restrict email addresses to your company domain, select Ends with and type @company.com.

  1. Optionally, provide an error message that will appear if the condition is not met.
  2. Publish the form and thoroughly test the custom validation.
  3. Remember to save the form after making any changes.



Make sure to save the form before testing the custom validation feature.


Updated on: 15/10/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!