Skip to content

benkiefer/jbootvalidator

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
lib
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

##JBootValidator

A fallback option that uses the html 5 required and pattern attributes to do validation when the browser doesn't support these features.

Demo

###Usage

Validate a single input.

 <input id="myInput" type="text" required pattern="\\d+"/>

 $('#myInput').validate();

Validate all inputs of a form each time that the element is focused on or changed.

$('formSelector').jBootValidator();

With all parameters defined.

$('formSelector').jBootValidator({
    validateOnSubmit : true,
    callback : function (form, e) {
        console.log('invoked');
    }
});

###Options:

Name Default Description
validateOnSubmit false should all inputs be validated before submitting the form?
callback no-op function which should be invoked after submitting a form. Callback is invoked with form and event object.

About

jquery bootstrap validator using html 5 attributes

Resources

License

Stars

Watchers

Forks

Packages

No packages published