Member Junction
    Preparing search index...

    Interface JSONFieldRule

    One @CHECK rule. Test receives the object the rule is scoped to and the owning entity, and returns true when the value is VALID (mirroring a SQL CHECK).

    Test is declared with method syntax deliberately: generated code supplies concrete parameter types (value: MyEntity_IConfig, row: MyEntity), which method parameter bivariance accepts.

    interface JSONFieldRule {
        Description: string;
        PerElement?: boolean;
        Property?: string;
        Type: string;
        Test(value: unknown, row: BaseEntity): boolean;
    }
    Index

    Properties

    Description: string

    Plain-language statement of the rule, used as the validation message.

    PerElement?: boolean

    When Property is array-typed the rule runs against each element rather than the array.

    Property?: string

    Property the rule was written on; interface-level rules omit it. Names the error source.

    Type: string

    Declared type whose instances the rule is scoped to.

    Methods