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.

Validating against special characters

  1. barthook
    Member

    Hi there! I would like to prevent a user from entering special characters. I only want alphanumeric characters to pass validation. I've searched high and low through this forum and cannot seem to find any suggestions. Help please?!

    Posted 14 years ago on Tuesday September 21, 2010 | Permalink
  2. What type of field are you using? Most of the fields have built in validation (numeric only allows numbers, etc.). In order to do custom validation on a field you would have to write custom code and use API hooks. How comfortable are you with PHP and WordPress development using hooks and filters?

    Posted 14 years ago on Tuesday September 21, 2010 | Permalink
  3. barthook
    Member

    I've tried all of the field types and none of them seem to do the special character validation I'm looking for. I'm comfortable with PHP and WordPress development with hooks and filters.

    Where in the gravity forms code base does validation take place? I'd like to mimic what you're doing there exactly with a different regular expression.

    Posted 14 years ago on Tuesday September 21, 2010 | Permalink