I want to remove default contact form validation and add my jquery validation in contact form in Magrnto2.2.5?
Any help would be appreciated.
-
2.2.5 have jquery validation on forms, you need to style it as per your designHassan Ali Shahzad– Hassan Ali Shahzad2019年04月09日 06:18:59 +00:00Commented Apr 9, 2019 at 6:18
-
No, it does not has jquery validation, I have added jquery validation, but it is conflicting with the default validation code.If I remove also it is not working.Amy– Amy2019年04月09日 06:22:36 +00:00Commented Apr 9, 2019 at 6:22
1 Answer 1
You can apply your custom validation after removing the following:-
File frontend/templates/form.phtml
- Remove
data-mage-init='{"validation":{}}'from<form> - For each form remove the
data-validate="{required:true}"inside<input>tag. - After performing #1 and #2 , apply your custom validation.
answered Apr 9, 2019 at 6:41
Rakesh Jakhar
2311 silver badge6 bronze badges
Explore related questions
See similar questions with these tags.
default