Classes
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. |
Returns:
The new array validator.
- Type
- is.__validationUnit
(static) Boolean() → {is.__validationUnit}
Create a new boolean validator.
Returns:
The new boolean validator.
- Type
- is.__validationUnit
(static) Number() → {is.__validationUnit}
Create a new number validator.
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. |
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). |
Returns:
The new variable type validator.
- Type
- is.__validationUnit
(static) optional() → {is.__validationUnit}
Create a new validator object that is optional.
Returns:
A new optional validator object.
- Type
- is.__validationUnit
(static) String() → {is.__validationUnit}
Create a new string validator.
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. |
Returns:
The new functional validator.
- Type
- is.__validationUnit