0

I want to remove phone validation from this form below, it's not accepting any phone number, the file is smiple_contact.phtml but I am not sure what code to delete. Thanks.

http://www.b2zee.com/b2c/index.php/b2zee-tourism

  • Not enough characters to paste the code here, what is another method? – Ashraf Jul 4 '16 at 13:48
0

Remove validate-must-phone class from Contact Number field.

For list of all available validation classes, check here : http://inchoo.net/magento/out-of-the-box-form-validation-in-magento/

| improve this answer | |
  • I deleted it, but when I submit the Form, an error appears. – Ashraf Jul 4 '16 at 13:43
  • if you don't want to validate if empty , remove required-entry class also – Anil Suthar Jul 4 '16 at 13:53
  • //var phoneno = /^\+[0-9]{6,20}$/; //var phoneno =/^(?([0-9]{3}))?[- ]?([0-9]{3})[- ]?([0-9]{5})$/; var phoneno =/\+(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)\W*\d\W*\d\W*\d\W*\d\W*\d\W*\d\W*\d\W*\d\W*(\d{1,2})$/; var x = document.getElementById("contact"); var x = x.value; Validation.add('validate-must-phone','You failed to enter Phone no!',function(x){ if( x.match(phoneno)) { return true; }else{ return false; – Ashraf Jul 4 '16 at 14:03
  • I have the is also at the bottom. – Ashraf Jul 4 '16 at 14:03
  • Then remove this element to be validated. Try to remove required-entry class. Can not debug the code you posted – Anil Suthar Jul 4 '16 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.