Namespace: is

is

Global constant & API entry point for Fluent JSON validator.
Source:

Classes

__validationUnit

Methods

(static) ArrayOf(schema) → {is.__validationUnit}

Create an array validator.
Parameters:
Name Type Description
schema is.__validationUnit Any validator that the array elements must validate against.
Source:
Returns:
The new array validator.
Type
is.__validationUnit

(static) Boolean() → {is.__validationUnit}

Create a new boolean validator.
Source:
Returns:
The new boolean validator.
Type
is.__validationUnit

(static) Number() → {is.__validationUnit}

Create a new number validator.
Source:
Returns:
The new number validator.
Type
is.__validationUnit

(static) Object(schemaObj) → {is.__validationUnit}

Create an object validator.
Parameters:
Name Type Description
schemaObj Object The schema object, made up of other validators.
Source:
Returns:
The new object validator.
Type
is.__validationUnit

(static) OneOf(schemaArray) → {is.__validationUnit}

Create a variable type validator.
Parameters:
Name Type Description
schemaArray Array.<is.__validationUnit> Array of validator objects the subject must match against (at least one of them).
Source:
Returns:
The new variable type validator.
Type
is.__validationUnit

(static) optional() → {is.__validationUnit}

Create a new validator object that is optional.
Source:
Returns:
A new optional validator object.
Type
is.__validationUnit

(static) String() → {is.__validationUnit}

Create a new string validator.
Source:
Returns:
The new string validator.
Type
is.__validationUnit

(static) Which(functionalValidator) → {is.__validationUnit}

Create a new functional validator.
Parameters:
Name Type Description
functionalValidator function The functional validator which checks the subject for functional requirements.
Source:
Returns:
The new functional validator.
Type
is.__validationUnit