how to apply validation in jquery code example
Example 1: form validation using jquery
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
then add javascript code:
$(document).ready(function() {
$("#form").validate();
});
</script>
Example 2: form validation using jquery
jQuery(document).ready(function() {
jQuery("#forms).validate({
rules: {
firstname: 'required',
lastname: 'required',
u_email: {
required: true,
email: true,
maxlength: 255,
},
}
});
});