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.

Address Validation - space is ok ?

  1. tcs
    Member

    I have received form submissions with customers who don't complete full address details.

    In my setup I hide address line 2, State Province Region and the Country field.

    So I am left with Address Line 1, City and Zip code.

    With the field set to required customers can simply enter1 character in the address line and then spaces in the other fields and this passes validation.

    Can the address line be validated to so it has more than 1 character (most addresses are more than 1 character!) and can the other fields have spaces stripped at the beginning and end so that if a customer just enters a space they get caught out.

    Posted 11 years ago on Tuesday November 6, 2012 | Permalink
  2. David Peralty

    You could use the following hook and some PHP to test for various things including spaces or less than any number of characters:

    http://www.gravityhelp.com/documentation/page/Gform_field_validation

    Posted 11 years ago on Tuesday November 6, 2012 | Permalink