@overturebio-stack/lectern-client
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Typed
Validation
Function
Validation
Function
ctx
build
Error
get
Script
get
Valid
Fields
is
Invalid
Enum
Value
is
Invalid
Field
Type
is
Invalid
Regex
Value
is
Out
OfRange
is
Required
Missing
run
Validation
Pipeline
validate
Enum
validate
Field
Names
validate
Non
Array
Fields
validate
Range
validate
Regex
validate
Required
Fields
validate
Script
validate
Value
Types
validate
With
Script
Index
Type aliases
Typed
Validation
Function
Validation
Function
Variables
ctx
Functions
build
Error
get
Script
get
Valid
Fields
is
Invalid
Enum
Value
is
Invalid
Field
Type
is
Invalid
Regex
Value
is
Out
OfRange
is
Required
Missing
run
Validation
Pipeline
validate
Enum
validate
Field
Names
validate
Non
Array
Fields
validate
Range
validate
Regex
validate
Required
Fields
validate
Script
validate
Value
Types
validate
With
Script
Type aliases
Typed
Validation
Function
Typed
Validation
Function
:
(
rec
:
TypedDataRecord
, index
:
number
, fields
:
Array
<
FieldDefinition
>
)
=>
Array
<
SchemaValidationError
>
Type declaration
(
rec
:
TypedDataRecord
, index
:
number
, fields
:
Array
<
FieldDefinition
>
)
:
Array
<
SchemaValidationError
>
Parameters
rec:
TypedDataRecord
index:
number
fields:
Array
<
FieldDefinition
>
Returns
Array
<
SchemaValidationError
>
Validation
Function
Validation
Function
:
(
rec
:
DataRecord
, index
:
number
, fields
:
Array
<
FieldDefinition
>
)
=>
Array
<
SchemaValidationError
>
Type declaration
(
rec
:
DataRecord
, index
:
number
, fields
:
Array
<
FieldDefinition
>
)
:
Array
<
SchemaValidationError
>
Parameters
rec:
DataRecord
index:
number
fields:
Array
<
FieldDefinition
>
Returns
Array
<
SchemaValidationError
>
Variables
Const
ctx
ctx
:
Context
= vm.createContext()
Functions
Const
build
Error
build
Error
(
errorType
:
SchemaValidationErrorTypes
, fieldName
:
string
, index
:
number
, info
?:
object
)
:
SchemaValidationError
Parameters
errorType:
SchemaValidationErrorTypes
fieldName:
string
index:
number
Default value
info:
object
= {}
Returns
SchemaValidationError
Const
get
Script
get
Script
(
scriptString
:
string
)
:
Script
Parameters
scriptString:
string
Returns
Script
Const
get
Valid
Fields
get
Valid
Fields
(
errs
:
ReadonlyArray
<
SchemaValidationError
>
, fields
:
ReadonlyArray
<
FieldDefinition
>
)
:
FieldDefinition
[]
Parameters
errs:
ReadonlyArray
<
SchemaValidationError
>
fields:
ReadonlyArray
<
FieldDefinition
>
Returns
FieldDefinition
[]
Const
is
Invalid
Enum
Value
is
Invalid
Enum
Value
(
codeList
:
CodeListRestriction
, value
:
string
|
boolean
|
number
|
undefined
)
:
boolean
Parameters
codeList:
CodeListRestriction
value:
string
|
boolean
|
number
|
undefined
Returns
boolean
Const
is
Invalid
Field
Type
is
Invalid
Field
Type
(
valueType
:
ValueType
, value
:
string
)
:
boolean
Parameters
valueType:
ValueType
value:
string
Returns
boolean
Const
is
Invalid
Regex
Value
is
Invalid
Regex
Value
(
regex
:
string
, value
:
string
)
:
boolean
Parameters
regex:
string
value:
string
Returns
boolean
Const
is
Out
OfRange
is
Out
OfRange
(
range
:
RangeRestriction
, value
:
number
|
undefined
)
:
boolean
Parameters
range:
RangeRestriction
value:
number
|
undefined
Returns
boolean
Const
is
Required
Missing
is
Required
Missing
(
field
:
FieldDefinition
, record
:
DataRecord
)
:
boolean
Parameters
field:
FieldDefinition
record:
DataRecord
Returns
boolean
Const
run
Validation
Pipeline
run
Validation
Pipeline
(
rec
:
DataRecord
|
TypedDataRecord
, index
:
number
, fields
:
ReadonlyArray
<
FieldDefinition
>
, funs
:
Array
<
ValidationFunction
|
TypedValidationFunction
>
)
:
SchemaValidationError
[]
Parameters
rec:
DataRecord
|
TypedDataRecord
index:
number
fields:
ReadonlyArray
<
FieldDefinition
>
funs:
Array
<
ValidationFunction
|
TypedValidationFunction
>
Returns
SchemaValidationError
[]
Const
validate
Enum
validate
Enum
(
rec
:
TypedDataRecord
, index
:
number
, fields
:
Array
<
FieldDefinition
>
)
:
SchemaValidationError
[]
Parameters
rec:
TypedDataRecord
index:
number
fields:
Array
<
FieldDefinition
>
Returns
SchemaValidationError
[]
Const
validate
Field
Names
validate
Field
Names
(
record
:
Readonly
<
DataRecord
>
, index
:
number
, fields
:
Array
<
FieldDefinition
>
)
:
SchemaValidationError
[]
Parameters
record:
Readonly
<
DataRecord
>
index:
number
fields:
Array
<
FieldDefinition
>
Returns
SchemaValidationError
[]
Const
validate
Non
Array
Fields
validate
Non
Array
Fields
(
record
:
Readonly
<
DataRecord
>
, index
:
number
, fields
:
Array
<
FieldDefinition
>
)
:
SchemaValidationError
[]
Parameters
record:
Readonly
<
DataRecord
>
index:
number
fields:
Array
<
FieldDefinition
>
Returns
SchemaValidationError
[]
Const
validate
Range
validate
Range
(
rec
:
TypedDataRecord
, index
:
number
, fields
:
ReadonlyArray
<
FieldDefinition
>
)
:
SchemaValidationError
[]
Parameters
rec:
TypedDataRecord
index:
number
fields:
ReadonlyArray
<
FieldDefinition
>
Returns
SchemaValidationError
[]
Const
validate
Regex
validate
Regex
(
rec
:
TypedDataRecord
, index
:
number
, fields
:
ReadonlyArray
<
FieldDefinition
>
)
:
SchemaValidationError
[]
Parameters
rec:
TypedDataRecord
index:
number
fields:
ReadonlyArray
<
FieldDefinition
>
Returns
SchemaValidationError
[]
Const
validate
Required
Fields
validate
Required
Fields
(
rec
:
DataRecord
, index
:
number
, fields
:
Array
<
FieldDefinition
>
)
:
SchemaValidationError
[]
Parameters
rec:
DataRecord
index:
number
fields:
Array
<
FieldDefinition
>
Returns
SchemaValidationError
[]
Const
validate
Script
validate
Script
(
rec
:
TypedDataRecord
, index
:
number
, fields
:
Array
<
FieldDefinition
>
)
:
SchemaValidationError
[]
Parameters
rec:
TypedDataRecord
index:
number
fields:
Array
<
FieldDefinition
>
Returns
SchemaValidationError
[]
Const
validate
Value
Types
validate
Value
Types
(
rec
:
DataRecord
, index
:
number
, fields
:
Array
<
FieldDefinition
>
)
:
SchemaValidationError
[]
Parameters
rec:
DataRecord
index:
number
fields:
Array
<
FieldDefinition
>
Returns
SchemaValidationError
[]
Const
validate
With
Script
validate
With
Script
(
field
:
FieldDefinition
, record
:
TypedDataRecord
)
:
{
message
:
string
;
valid
:
boolean
}
Parameters
field:
FieldDefinition
record:
TypedDataRecord
Returns
{
message
:
string
;
valid
:
boolean
}
message
:
string
valid
:
boolean
Generated using
TypeDoc