Sanity Library Reference Docs
Preparing search index...
sanity
index
ObjectRule
Interface ObjectRule
interface
ObjectRule
{
custom
:
<
LenientFieldValue
extends
Record
<
string
,
unknown
>
>
(
fn
:
CustomValidator
<
LenientFieldValue
>
,
)
=>
ObjectRule
;
error
:
(
message
?:
string
|
LocalizedValidationMessages
)
=>
ObjectRule
;
info
:
(
message
?:
string
|
LocalizedValidationMessages
)
=>
ObjectRule
;
required
:
()
=>
ObjectRule
;
valueOfField
:
(
path
:
string
|
string
[]
)
=>
FieldReference
;
warning
:
(
message
?:
string
|
LocalizedValidationMessages
)
=>
ObjectRule
;
}
Hierarchy (
View Summary
)
RuleDef
<
ObjectRule
,
Record
<
string
,
unknown
>
>
ObjectRule
Index
Properties
custom
error
info
required
value
Of
Field
warning
Properties
custom
custom
:
<
LenientFieldValue
extends
Record
<
string
,
unknown
>
>
(
fn
:
CustomValidator
<
LenientFieldValue
>
,
)
=>
ObjectRule
error
error
:
(
message
?:
string
|
LocalizedValidationMessages
)
=>
ObjectRule
info
info
:
(
message
?:
string
|
LocalizedValidationMessages
)
=>
ObjectRule
required
required
:
()
=>
ObjectRule
value
Of
Field
valueOfField
:
(
path
:
string
|
string
[]
)
=>
FieldReference
warning
warning
:
(
message
?:
string
|
LocalizedValidationMessages
)
=>
ObjectRule
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
custom
error
info
required
value
Of
Field
warning
Sanity Library Reference Docs
Loading...