Interface ErrorStrings

Map of custom error messages for the default validation methods.

See

Hierarchy

  • ErrorStrings

Properties

maxLength: string | MessageResolver<number>

Error message for when the field length is too long.

Can either be a string, or a function resolving to a string.

Default:

(n) => `Must be no more than ${n} characters long`

See

minLength: string | MessageResolver<number>

Error message for when the field length is too short.

Can either be a string, or a function resolving to a string.

Default:

(n) => `Must be at least ${n} characters long`

See

required: string

Error message for when the field is required but missing.

Default: "Required"

See

FieldOptions.required for defining a field as required

Generated using TypeDoc