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 PHP Validation for email domains -- Help Needed

  1. Anonymous

    Hi Alex et al, I was hoping someone could help with this issue. Posted on someone else's thread but never saw a reply there so posting a new topic here:

    My client wants us to validate the email field to ensure it's not coming from any free email hosts (they want commercial entities only). Here's their original code snippet for this validation... my question is how do I incorporate this into GF?

    URL to current form page:

    Validation code snippet can be found here:

    or view here:



    Posted 11 years ago on Tuesday August 9, 2011 | Permalink
  2. You can use the gform_validation hook to write custom validation for a field. There is a tutorial on how to use this hook here:

    You would write custom validation using the gform_validation hook using the validation code you have to write your own custom validation.

    Posted 11 years ago on Tuesday August 9, 2011 | Permalink