isomorphic-validation v0.10.0
isomorphic-validation
An isomorphic form validation javascript library which runs the same code both client and server side and allows for reusing validation logic for the same fields on different forms.
🕙 Developing ...
Documentation
API overview:
Core module "isomorphic-validation"
The core module of the library exports two entities: Validation
and Predicate
.
Instance methods:
Validation().started()
Validation().valid()
Validation().invalid()
Validation().changed()
Validation().validated()
Validation().error()
Validation().constraint()
Validation().bind()
Validation().dataMapper()
Validation().validate()
Predicate().started()
Predicate().valid()
Predicate().invalid()
Predicate().changed()
Predicate().validated()
Predicate().error()
Predicate().restored()
Instance properties:
Validation().client
Validation().server
Validation().isomorphic
Validation().isValid
Validation().constraints
Validation().validations
Static methods:
Validation object
A Validation
object can be created several ways:
- a single
Validation
is created by the constructor function. - a grouping
Validation
is created by the static methodsValidation.group()
andValidation.glue()
- also a grouping
Validation
with nested (grouped), bound to form fieldsValidation
objects is created by theValidation.profile()
static method. - and lastly, a single
Validation
is created by theValidation.clone()
method from anotherValidation
.
Nested (grouped) Validation
objects are accessed through:
- the
Validation().validations
property. - by form field names when created using the
Validation.profile()
method.
Predicate object
A Predicate
object can be created:
- by the constructor function.
- cloned from another
Predicate
object when passed into the constructor function.
Predicate
objects added to validations can be accessed:
- through the
Validation().constraints
property. - in state callbacks through the
ValidationResult
object passed in.
UI module "isomorphic-validation/ui"
The UI module exports the following set of helper, renderer and effect functions for performing UI side effects:
Helper functions
Renderer functions
Effect functions
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
8 months ago
5 months ago
5 months ago
7 months ago
5 months ago
7 months ago
5 months ago
5 months ago
7 months ago
5 months ago
5 months ago
7 months ago
5 months ago
7 months ago
8 months ago
5 months ago
7 months ago
7 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
7 months ago
5 months ago
5 months ago
6 months ago
6 months ago
6 months ago
6 months ago
7 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
8 months ago
5 months ago
5 months ago
8 months ago
5 months ago
5 months ago
8 months ago
5 months ago
5 months ago
5 months ago
6 months ago
8 months ago
6 months ago
8 months ago
5 months ago
8 months ago
5 months ago
8 months ago
10 months ago
10 months ago
11 months ago
11 months ago
11 months ago
1 year ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
1 year ago
9 years ago