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
    Unregistered

    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:
    http://www.sdmsoftware.com/freeware-registration-form/

    Validation code snippet can be found here:
    http://dl.dropbox.com/u/19790225/email_form_validation.php

    or view here:
    http://pastebin.com/Gf5Dhzve

    Thanks,

    Sean

    Posted 13 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:

    http://www.gravityhelp.com/documentation/page/Using_the_Gravity_Forms_%22gform_valiation%22_Hook

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

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