How to use HTML 5 Form Validation on Contact Form 7 Plugin ?

maxresdefault

By default, the contact form 7 plugin uses ajax validation to check the form entries. You can instantaneously validate some common fields like email, text for blank or invalid entries by adding required attribute to the form.

Just add the below JQuery code to use HTML 5 Form Validation on Contact Form 7 Plugin.

<script>

jQuery(document).ready(function(jQuery){

jQuery(".wpcf7-form-control").prop('required',true);

jQuery(".wpcf7-form").removeAttr('novalidate');

});

</script>

The third line in the code is for fields. You can change the class to target specific field type.
Let me know your thoughts and suggestions.

0938.54.84.99