novx
Preparing search index...
core/src
ArrayType
Class ArrayType<T>
this constraint class adds specific checks for arrays.
Type Parameters
T
extends
any
[]
Hierarchy (
View Summary
)
Type
<
T
>
ArrayType
Index
Constructors
constructor
Properties
base
Type
element
message?
name?
tests
cache
Methods
check
error
Message
is
Valid
max
min
nullable
optional
params4
required
test
to
JSON
to
String
validate
create
get
get
Constraints
get
Types
patch
register
register
Factory
Constructors
constructor
new
ArrayType
<
T
extends
any
[]
>
(
element
:
Type
<
any
>
)
:
ArrayType
<
T
>
Type Parameters
T
extends
any
[]
Parameters
element
:
Type
<
any
>
Returns
ArrayType
<
T
>
Properties
base
Type
baseType
:
string
= "string"
element
element
:
Type
<
any
>
Optional
message
message
?:
string
Optional
name
name
?:
string
tests
tests
:
Test
<
T
>
[]
= []
Static
cache
cache
:
{}
= {}
Methods
check
check
(
object
:
T
,
context
:
ValidationContext
)
:
void
Parameters
object
:
T
context
:
ValidationContext
Returns
void
error
Message
errorMessage
(
message
:
string
)
:
Type
<
T
>
Parameters
message
:
string
Returns
Type
<
T
>
is
Valid
isValid
(
object
:
T
)
:
boolean
Parameters
object
:
T
Returns
boolean
max
max
(
max
:
number
,
info
?:
ConstraintInfo
)
:
ArrayType
<
T
>
Parameters
max
:
number
Optional
info
:
ConstraintInfo
Returns
ArrayType
<
T
>
min
min
(
min
:
number
,
info
?:
ConstraintInfo
)
:
ArrayType
<
T
>
Parameters
min
:
number
Optional
info
:
ConstraintInfo
Returns
ArrayType
<
T
>
nullable
nullable
()
:
Type
<
T
>
Returns
Type
<
T
>
optional
optional
()
:
Type
<
T
>
Returns
Type
<
T
>
params4
params4
(
constraint
:
string
)
:
any
Parameters
constraint
:
string
Returns
any
required
required
()
:
Type
<
T
>
Returns
Type
<
T
>
test
test
(
test
:
Test
<
T
>
)
:
Type
<
T
>
Parameters
test
:
Test
<
T
>
Returns
Type
<
T
>
to
JSON
toJSON
()
:
Record
<
string
,
any
>
Returns
Record
<
string
,
any
>
to
String
toString
()
:
string
Returns
string
validate
validate
(
object
:
T
)
:
void
Parameters
object
:
T
Returns
void
Static
create
create
(
typeName
:
string
,
constraints
?:
Record
<
string
,
any
>
)
:
Type
<
any
>
Parameters
typeName
:
string
Optional
constraints
:
Record
<
string
,
any
>
Returns
Type
<
any
>
Static
get
get
(
type
:
string
)
:
Type
<
any
>
|
undefined
Parameters
type
:
string
Returns
Type
<
any
>
|
undefined
Static
get
Constraints
getConstraints
(
typeName
:
string
)
:
ConstraintMethodDescriptor
[]
Parameters
typeName
:
string
Returns
ConstraintMethodDescriptor
[]
Static
get
Types
getTypes
()
:
string
[]
Returns
string
[]
Static
patch
patch
(
object
:
any
,
property
:
string
,
evaluate
:
()
=>
any
)
:
void
Parameters
object
:
any
property
:
string
evaluate
:
()
=>
any
Returns
void
Static
register
register
(
constraint
:
Type
<
any
>
)
:
typeof
Type
Parameters
constraint
:
Type
<
any
>
Returns
typeof
Type
Static
register
Factory
registerFactory
(
typeName
:
string
,
typeClass
:
new
()
=>
Type
<
any
>
)
:
void
Parameters
typeName
:
string
typeClass
:
new
()
=>
Type
<
any
>
Returns
void
Settings
Member Visibility
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
base
Type
element
message
name
tests
cache
Methods
check
error
Message
is
Valid
max
min
nullable
optional
params4
required
test
to
JSON
to
String
validate
create
get
get
Constraints
get
Types
patch
register
register
Factory
novx
Loading...
this constraint class adds specific checks for arrays.