Skip to content
vivin edited this page Jul 19, 2012 · 13 revisions

Notice: Regula now includes an optional jQuery plugin

Overview

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.

Constraints API

  • 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.

Validation API

Enums

Clone this wiki locally