Support

Home Forums Event Espresso Premium Phone field validation

Phone field validation

Posted: June 23, 2015 at 8:01 am

Viewing 3 reply threads


Rubeena Mansuri

June 23, 2015 at 8:01 am

Hi, is there any way to validate Phone field? I want minimum number length validation.


Lorenzo Orlando Caum

  • Support Staff

June 23, 2015 at 12:24 pm

Hi Rubeena, phone field validation is not available out of the box since the formatting and length of phone numbers can vary from country to country.

You could introduce some validation by using some jQuery and there is an example here that you could use as a starting point:

https://gist.github.com/Apina/bc1b19ff2f3c3b73b369

If you are not comfortable with custom coding, then please check with an Event Espresso developer:

https://eventespresso.com/developers/event-espresso-pros/


Lorenzo


Rubeena Mansuri

June 25, 2015 at 11:20 am

Thanks. Got it working with given code. Can you tell me how to add this code to only EE related pages? Where is script file located?


Lorenzo Orlando Caum

  • Support Staff

June 25, 2015 at 11:27 am

Hi, you would like this to only appear on the registration checkout page, correct?

This sample coding is added to your child theme’s functions.php file and then it loads outside scripts to help with the validation.


Lorenzo

Viewing 3 reply threads

The support post ‘Phone field validation’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso