Veryform

About

Veryform supports 8 types:
,
,
,
,
,
,
,
.

Very smart plugin with your own regular expression:-) yes, since now You can decide how much checkboxes must be checked to be valid, or apply expression to valid your text input. Enjoy your very smart and bright Veryform.

How smart is it?

  • If you forget the type parameter in
    then Veryform smartly add it to your field.
  • If You deliver element without a name parameter in group elems like:
    or
    then Veryform smartly remove those elems from your form.
  • If you deliver regular expressions to particular field, and it will not be appriopriate to its type, for example:
    regex: { '[type=checkbox]': '/foo/i' }
    then Veryform smartly replace your regex with appriopriate value for its type, in this case:
    regex: { '[type=checkbox]': 1 }
    .

Install

The latest stable release includes everything you need to use Veryform.

Getting started

HTML

Veryform works on a
<form>
element
...

how to initialize:


var $form = $('#myform'); //form must be a SINGLE jQuery object
var veryform = new Veryform($form); //with default options
var veryform = new Veryform($form, {
	//with your options
});

You can use a string as a selector but only for a SINGLE element

var veryform = new Veryform('#myform'); //with default options
var veryform = new Veryform('#myform', {
	//with your options
});

or:

var veryform = $('form').veryform(); //with default options
var veryform = $('#myform').veryform({
	//with your options
});

simple initialize in HTML:


Options set in HTML must be valid JSON.

get the Veryform instance:

var veryform = $form.data('veryform');