interface DataFieldOptions {
    required: boolean;
    nullable: boolean;
    gmOnly: boolean;
    initial: any;
    label: string;
    hint: string;
    validate: DataFieldValidator;
    validationError: string;
}

Properties

required: boolean

Is this field required to be populated?

nullable: boolean

Can this field have null values?

gmOnly: boolean

Can this field only be modified by a gamemaster or assistant gamemaster?

initial: any

The initial value of a field, or a function which assigns that initial value.

label: string

A localizable label displayed on forms which render this field.

hint: string

Localizable help text displayed on forms which render this field.

A custom data field validation function.

validationError: string

A custom validation error string. When displayed will be prepended with the document name, field name, and candidate value. This error string is only used when the return type of the validate function is a boolean. If an Error is thrown in the validate function, the string message of that Error is used.