Preparing search index...
The search index is not available
Houston Common Library
Houston Common Library
@45drives/houston-common-ui
ValidationScope
Class ValidationScope
Index
Constructors
constructor
Properties
add
Validator
Result
all
Validators
Okay
remove
Validator
Result
validator
Results
Methods
is
Valid
use
Validator
use
Zod
Validator
Constructors
constructor
new
Validation
Scope
(
)
:
ValidationScope
Returns
ValidationScope
Properties
Private
add
Validator
Result
add
Validator
Result
:
any
Private
all
Validators
Okay
all
Validators
Okay
:
any
Private
remove
Validator
Result
remove
Validator
Result
:
any
Private
validator
Results
validator
Results
:
any
Methods
is
Valid
is
Valid
(
)
:
boolean
Returns
boolean
use
Validator
use
Validator
(
validator
:
Validator
)
:
{
triggerUpdate
:
(
(
)
=>
void
)
;
validationResult
:
Ref
<
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
?:
string
;
type
:
"success"
;
}
|
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
:
string
;
type
:
"error"
;
}
|
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
:
string
;
type
:
"warning"
;
}
>
;
}
Parameters
validator
:
Validator
Returns
{
triggerUpdate
:
(
(
)
=>
void
)
;
validationResult
:
Ref
<
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
?:
string
;
type
:
"success"
;
}
|
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
:
string
;
type
:
"error"
;
}
|
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
:
string
;
type
:
"warning"
;
}
>
;
}
trigger
Update
:
(
(
)
=>
void
)
(
)
:
void
Returns
void
validation
Result
:
Ref
<
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
?:
string
;
type
:
"success"
;
}
|
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
:
string
;
type
:
"error"
;
}
|
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
:
string
;
type
:
"warning"
;
}
>
use
Zod
Validator
use
Zod
Validator
<
Z
extends
ZodTypeAny
>
(
schema
:
Z
,
getter
:
(
(
)
=>
TypeOf
<
Z
>
)
,
scope
?:
ValidationScope
)
:
{
triggerUpdate
:
(
(
)
=>
void
)
;
validationResult
:
Ref
<
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
?:
string
;
type
:
"success"
;
}
|
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
:
string
;
type
:
"error"
;
}
|
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
:
string
;
type
:
"warning"
;
}
>
;
}
Type Parameters
Z
extends
ZodTypeAny
=
ZodNever
Parameters
schema
:
Z
getter
:
(
(
)
=>
TypeOf
<
Z
>
)
(
)
:
TypeOf
<
Z
>
Returns
TypeOf
<
Z
>
Optional
scope
:
ValidationScope
Returns
{
triggerUpdate
:
(
(
)
=>
void
)
;
validationResult
:
Ref
<
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
?:
string
;
type
:
"success"
;
}
|
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
:
string
;
type
:
"error"
;
}
|
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
:
string
;
type
:
"warning"
;
}
>
;
}
trigger
Update
:
(
(
)
=>
void
)
(
)
:
void
Returns
void
validation
Result
:
Ref
<
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
?:
string
;
type
:
"success"
;
}
|
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
:
string
;
type
:
"error"
;
}
|
{
actions
?:
{
callback
:
(
(
)
=>
void
|
PromiseLike
<
void
>
)
;
label
:
string
;
}
[]
;
message
:
string
;
type
:
"warning"
;
}
>
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
constructor
add
Validator
Result
all
Validators
Okay
remove
Validator
Result
validator
Results
is
Valid
use
Validator
use
Zod
Validator
Official Cockpit API Documentation
Houston Common Library
Loading...