1

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 design – Hassan Ali Shahzad Apr 9 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 Apr 9 at 6:22
1

You can apply your custom validation after removing the following:-

File frontend/templates/form.phtml

  1. Remove data-mage-init='{"validation":{}}' from <form>
  2. For each form remove the data-validate="{required:true}" inside <input> tag.
  3. After performing #1 and #2 , apply your custom validation.

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.