Sanity Library Reference Docs
    Preparing search index...

    Interface SlugRule

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

    Hierarchy (View Summary)

    Index

    Properties

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