A repository of over 1000 quality jQuery plugins

jQuery validify.js

validify.js is a jQuery General Inputs plugin.

Created by emretekince

simple and modern login form validation

Not what you're looking for? Click here to view more General Inputs jQuery plugins

validify.js

a jquery plugin for simple login form validation

alt tag

Demo: http://projects.emretekince.com/validifyjs/demo.html

Installation

  • Extract files
  • Add validify.js and validify.css to your project and make sure that you have jQuery in your project.
  • Call the plugin with $("#example-form").validify();

Options

Options for plugin.

errorStyle CSS class for textbox when it's invalid. Default: validifyError

successStyle CSS class for textbox when it's valid. Default: validifySuccess

emailField Name of e-mail field to special check. Default : input[name='email']

emailCheck Enables checking for email field. Default : true

requiredAttr HTML tag which defines field is required. Default : required

Events

onSubmit Callback when the form is submitted.

onFormSuccess Callback when the form is valid.

onFormFail Callback when the form is invalid.

Example

Form

<form  id="demo" >
    <div class="form-group">
        <input type="email" class="form-control textbox" name="email" required placeholder="e-mail">
    </div>
    <div class="form-group">
        <input type="password" class="form-control textbox" required placeholder="pass">
    </div>
    <div class="form-group">
        <button class="btn btn-default btn-osx btn-lg"  type="submit"><i class="fa fa-arrow-circle-right"></i></button>
    </div>
    <div class="alert alert-success hidden" role="alert">Successfully</div>
</form>

Javascript

$("#demo").validify({
    onSubmit: function (e, $this) {
        $this.find('.alert').removeClass('hidden')
    },
    onFormSuccess: function (form) {
        console.log("Form is valid now!")
    },
    onFormFail: function (form) {
        console.log("Form is not valid :(")
    }
});

License: Do whatever you want with this



You might also like these other General Inputs jQuery Plugins

  • jquery.fajax

    Lightweight jQuery plugin for ajaxifying forms

  • toTextarea

    Makes a div act like a textarea to allow auto resizing and formatting options. Also allows drag and drop images […]

  • Move Selected

    Move selected options in a select up or down

 Views
 Downloads

Preview Download Github Page
License:

The MIT License (MIT)