Monarch Database API - v1.0.0
Preparing search index...
SchemaValidator
Class SchemaValidator
Index
Constructors
constructor
Methods
compile
validate
Constructors
constructor
new
SchemaValidator
()
:
SchemaValidator
Returns
SchemaValidator
Methods
compile
compile
(
schema
:
SchemaDefinition
,
)
:
(
document
:
Document
)
=>
{
errors
?:
string
[]
;
valid
:
boolean
}
Compile a schema for repeated use (if using AJV)
Parameters
schema
:
SchemaDefinition
Returns
(
document
:
Document
)
=>
{
errors
?:
string
[]
;
valid
:
boolean
}
validate
validate
(
document
:
Document
,
schema
:
SchemaDefinition
,
)
:
{
errors
?:
string
[]
;
valid
:
boolean
}
Validate a document against a schema
Parameters
document
:
Document
schema
:
SchemaDefinition
Returns
{
errors
?:
string
[]
;
valid
:
boolean
}
Settings
Member Visibility
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Methods
compile
validate
Monarch Database API - v1.0.0
Loading...
Compile a schema for repeated use (if using AJV)