PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Custom field validation

  1. wouterbruijning
    Member

    I'm trying to create a field with custom validation. The input must be validated against a array with data. For example, it must start with: array('1428','2159','2241','2242');

    I have already searched the docs and faq, but was unable to find how to create his. I have found the following topic on this forum:

    http://forum.gravityhelp.com/topic/custom-field-that-supports-validation-by-regular-expressions

    But I'm unable to find out where I need to put that code.

    Posted 13 years ago on Tuesday December 14, 2010 | Permalink
  2. All custom code that interacts with Gravity Forms via API hooks would go in your themes functions.php file. That forum post does have an example of using the gform_validation hook to create custom validation on a field so that is what you would need to use, although customized for your actual needs.

    Posted 13 years ago on Tuesday December 14, 2010 | Permalink