Simple Automatic Form Validation Plugin with jQuery - Validify.js

File Size: 5.7 KB
Views Total: 2622
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Simple Automatic Form Validation Plugin with jQuery - Validify.js

Validify.js is a very small jQuery plugin which provides real-time, client side input field validation on your login form.

Features:

  • Automatically checks fields.
  • E-mail format check.
  • Disabled button when invalid.
  • Form fail and success events.
  • onSubmit event.
  • Compatible with Bootstrap framework.

How to use it:

1. Create a login form with email and password fields on the webpage.

<form id="demo" novalidate>
  <input type="email" name="email" required placeholder="e-mail">
  <input type="password" required placeholder="pass">
  <button disabled type="submit"></button>
</form>

2. Download and include the validify.js script after you've added jQuery library.

<script src="//code.jquery.com/jquery-2.2.0.min.js"></script>
<script src="validify.js"></script>

3. Just call the function on the login form and the plugin will take care of the rest.

$("#demo").validify();

4. Possible plugin options.

$("#demo").validify({
  errorStyle: "validifyError",
  successStyle: "validifySuccess",
  emailFieldName: "email",
  emailCheck: true,
  requiredAttr: "required",
});

5. Callback functions.

$("#demo").validify({
  onSubmit: function () {
  },
  onFormSuccess: function () {
  },
  onFormFail: function () {
  }
});

This awesome jQuery plugin is developed by emretekince. For more Advanced Usages, please check the demo page or visit the official website.