Sanity Library Reference Docs
    Preparing search index...

    Interface BlockRule

    interface BlockRule {
        custom: <LenientFieldValue extends any[]>(
            fn: CustomValidator<LenientFieldValue>,
        ) => BlockRule;
        error: (message?: string | LocalizedValidationMessages) => BlockRule;
        info: (message?: string | LocalizedValidationMessages) => BlockRule;
        required: () => BlockRule;
        valueOfField: (path: string | string[]) => FieldReference;
        warning: (message?: string | LocalizedValidationMessages) => BlockRule;
    }

    Hierarchy (View Summary)

    Index

    Properties

    custom: <LenientFieldValue extends any[]>(
        fn: CustomValidator<LenientFieldValue>,
    ) => BlockRule
    error: (message?: string | LocalizedValidationMessages) => BlockRule
    info: (message?: string | LocalizedValidationMessages) => BlockRule
    required: () => BlockRule
    valueOfField: (path: string | string[]) => FieldReference
    warning: (message?: string | LocalizedValidationMessages) => BlockRule