WPPizza – A Restaurant Plugin for WordPress › Support › Feature Requests › Phone number validation in order form
- AuthorPosts
- 2 March, 2016 at 4:21 pm #16295
Hi,
First of all, thank you developers for this great app. I am trying to add this plugin in one of the website ‘www.egg-delight.com’. This plugin is just great to work with. We are currently is testing phase and when we were trying to place order, the phone number is not validated. For example if I put phone number as ‘00000000000000000000’, it is also accepted. Can we have this validation?
2 March, 2016 at 4:28 pm #16297there is no way to add some phonenumber validation into the plugin itself that would work for all countries, or – more accurately – if one were to have validation that would take account of the number formatting possible in all countries, it would be pretty useless.
I’m afraid you will have to add that yourself depending on where you are
just a quick search comes up with lots of examples
https://www.google.co.uk/?gws_rd=ssl#q=jquery+validation+phone+number
NOTE: the plugin automatically uses/adds the jquery validation plugin (http://jqueryvalidation.org) so you can build/add something on that basis if you want
2 March, 2016 at 4:34 pm #16298mind you, *perhaps* i could add some field in the order form settings that would let you add a regex for validation with some default validation pattern and optionally your own , but i fear this would go over most peoples heads.
i’ll mull it over, but won’t be before v3.0 at the earliest
2 March, 2016 at 4:36 pm #16299Thank you Olly, I will try to add it.. I am new to wordpress file structure.. If you can help to know where I can update it.. I will do some research and do it.
2 March, 2016 at 4:49 pm #16300Thank you, adding regex would be great. But I need this to be done earliest, I probably will do it on my own. I just need to know the file name where I can add validations.
2 March, 2016 at 5:12 pm #16301>I just need to know the file name where I can add validations.
you have to add your own , or put it in the page via some action
see here for a bunch of examplesperhaps adding a conditional like
global $post; if($post->ID == /*id of your orderpage */){ echo the validation.....etc etc }
so it only gets included on the actual order page
2 March, 2016 at 5:33 pm #16302Thank you so much, ‘Using id of orderpage’.. This is what I needed to know.. I will take care of the validation..
2 March, 2016 at 5:40 pm #16303glad i could help
- AuthorPosts
- The topic ‘Phone number validation in order form’ is closed to new replies.