Sanity Library Reference Docs
    Preparing search index...

    Type Alias SchemaValidationValue

    SchemaValidationValue:
        | false
        | undefined
        | Rule
        | SchemaValidationValue[]
        | ((rule: Rule) => SchemaValidationValue)

    Represents the possible values of a schema type's validation field.

    If the schema has not been run through inferFromSchema from sanity/validation then value could be a function.

    inferFromSchema mutates the schema converts this value to an array of Rule instances.