Jquery Form validation using jquery validation and makes simple client side form validation easy, with still offering plenty of customization options, this is jquery tutorial guide a to add validation into the forms.
<form id="myform" action="post">
<input type="text" name="email" />
<input type="text" name="name" />
<input type="submit" />
</form>
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src=" https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.1/jquery.validate.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#myform').validate({ // Jquery Validation
rules: {
email: {
required: true,
email: true
},
name: {
required: true,
minlength: 5
}
}
});
});
</script>
No comments:
Post a Comment