Form Validation

jQuery Validation plugin makes simple clientside form validation easy, whilst still offering plenty of customization options. It makes a good choice if you’re building something new from scratch, but also when you’re trying to integrate something into an existing application with lots of existing markup.

Step 1

Add JavaScript file before end body tag

<script src="assets/vendor/jquery.validate/jquery.validate.min.js"></script>

Step 2

Add Markup

<form class="needs-validation" action="#">
<div class="form-row">
<div class="form-group floating-label col-md-12">
<input type="email" required class="form-control" placeholder="Email">
<div class="form-group floating-label col-md-12">
<input type="password" required class="form-control " id="password"
<button type="submit" class="btn btn-primary btn-block btn-lg">Login</button>

Step 3

Initialize the Plugin

errorClass: "is-invalid",
validClass: "is-valid",