Interface ContentTypeFieldValidation

Definition of a single validation rule applied to the related content type field

interface ContentTypeFieldValidation {
    enabledNodeTypes?: (
        | "document"
        | "paragraph"
        | "heading-1"
        | "heading-2"
        | "heading-3"
        | "heading-4"
        | "heading-5"
        | "heading-6"
        | "ordered-list"
        | "unordered-list"
        | "list-item"
        | "hr"
        | "blockquote"
        | "embedded-entry-block"
        | "embedded-asset-block"
        | "embedded-resource-block"
        | "table"
        | "table-row"
        | "table-cell"
        | "table-header-cell"
        | "asset-hyperlink"
        | "embedded-entry-inline"
        | "embedded-resource-inline"
        | "entry-hyperlink"
        | "hyperlink"
        | "resource-hyperlink")[];
    in?: string[];
    linkContentType?: string[];
    linkMimetypeGroup?: string[];
    message?: null | string;
    nodes?: {
        asset-hyperlink?: Pick<ContentTypeFieldValidation, "size" | "message">[];
        embedded-asset-block?: Pick<ContentTypeFieldValidation, "size" | "message">[];
        embedded-entry-block?: Pick<ContentTypeFieldValidation, "size" | "linkContentType" | "message">[];
        embedded-entry-inline?: Pick<ContentTypeFieldValidation, "size" | "linkContentType" | "message">[];
        embedded-resource-block?: {
            allowedResources: ContentTypeAllowedResources[];
            validations: Pick<ContentTypeFieldValidation, "size" | "message">[];
        };
        entry-hyperlink?: Pick<ContentTypeFieldValidation, "size" | "linkContentType" | "message">[];
    };
    regexp?: {
        pattern: string;
    };
    size?: {
        max?: number;
        min?: number;
    };
    unique?: boolean;
}

Properties

enabledNodeTypes?: (
    | "document"
    | "paragraph"
    | "heading-1"
    | "heading-2"
    | "heading-3"
    | "heading-4"
    | "heading-5"
    | "heading-6"
    | "ordered-list"
    | "unordered-list"
    | "list-item"
    | "hr"
    | "blockquote"
    | "embedded-entry-block"
    | "embedded-asset-block"
    | "embedded-resource-block"
    | "table"
    | "table-row"
    | "table-cell"
    | "table-header-cell"
    | "asset-hyperlink"
    | "embedded-entry-inline"
    | "embedded-resource-inline"
    | "entry-hyperlink"
    | "hyperlink"
    | "resource-hyperlink")[]
in?: string[]
linkContentType?: string[]
linkMimetypeGroup?: string[]
message?: null | string
nodes?: {
    asset-hyperlink?: Pick<ContentTypeFieldValidation, "size" | "message">[];
    embedded-asset-block?: Pick<ContentTypeFieldValidation, "size" | "message">[];
    embedded-entry-block?: Pick<ContentTypeFieldValidation, "size" | "linkContentType" | "message">[];
    embedded-entry-inline?: Pick<ContentTypeFieldValidation, "size" | "linkContentType" | "message">[];
    embedded-resource-block?: {
        allowedResources: ContentTypeAllowedResources[];
        validations: Pick<ContentTypeFieldValidation, "size" | "message">[];
    };
    entry-hyperlink?: Pick<ContentTypeFieldValidation, "size" | "linkContentType" | "message">[];
}
regexp?: {
    pattern: string;
}
size?: {
    max?: number;
    min?: number;
}
unique?: boolean