Skip to content

StringPropertyValidationSchema

@firecms/core


@firecms/core / StringPropertyValidationSchema

Defined in: types/properties.ts:729

Validation rules for strings

optional length: number

Defined in: types/properties.ts:730


optional lowercase: boolean

Defined in: types/properties.ts:739


optional matches: string | RegExp

Defined in: types/properties.ts:733


optional matchesMessage: string

Defined in: types/properties.ts:737

Message displayed when the input does not satisfy the regex in matches


optional max: number

Defined in: types/properties.ts:732


optional min: number

Defined in: types/properties.ts:731


optional required: boolean

Defined in: types/properties.ts:689

Is this field required

PropertyValidationSchema.required


optional requiredMessage: string

Defined in: types/properties.ts:694

Customize the required message when the property is not set

PropertyValidationSchema.requiredMessage


optional trim: boolean

Defined in: types/properties.ts:738


optional unique: boolean

Defined in: types/properties.ts:700

If the unique flag is set to true, you can only have one entity in the collection with this value.

PropertyValidationSchema.unique


optional uniqueInArray: boolean

Defined in: types/properties.ts:708

If the uniqueInArray flag is set to true, you can only have this value once per entry in the parent ArrayProperty. It has no effect if this property is not a child of an ArrayProperty. It works on direct children of an ArrayProperty or first level children of MapProperty

PropertyValidationSchema.uniqueInArray


optional uppercase: boolean

Defined in: types/properties.ts:740