-
Notifications
You must be signed in to change notification settings - Fork 24
vivin edited this page Jul 19, 2012
·
13 revisions
Notice: Regula now includes an optional jQuery plugin
The Regula API is very simple, yet powerful. It lets you bind constraints to their elements, define custom constraints, override (certain attributes of) already-defined constraints, and validates forms and input elements against their constraints. The Regula API can be divided into two parts. One part deals with constraints (binding, defining, and overriding) while the second part deals with validation.
- regula.bind – Binds constraints defined in HTML to the actual elements, or performs programmatic binding.
- regula.unbind – Unbinds all bound constraints (from all elements, or specific elements), or unbinds specific constraints from specific elements.
- regula.custom – Defines a custom constraint.
- regula.compound – Provides the ability to define compound constraints.
- regula.override – Overrides an already-defined constraint.
- regula.validate – Performs validation.
- regula.Constraint – An enum (kind of) for constraint types.
- regula.Group – An enum (kind of) for constraint groups.
- regula.DateFormat – An enum (kind of) for date formats.