Skip to main content

ArrayExtension<ItemSchema>

ArrayExtension<ItemSchema> = object

Extension methods for array constraints.

Since​

2.0.0


Type Parameters​

ItemSchema: ItemSchema extends GenericSchema​

The item schema type


Properties​

minLength(): (min, errorMessage?) => ArrayConstraint<ItemSchema>​

min: number
errorMessage?: string
Returns: ArrayConstraint<ItemSchema>

maxLength(): (max, errorMessage?) => ArrayConstraint<ItemSchema>​

max: number
errorMessage?: string
Returns: ArrayConstraint<ItemSchema>

length(): (length, errorMessage?) => ArrayConstraint<ItemSchema>​

length: number
errorMessage?: string
Returns: ArrayConstraint<ItemSchema>

unique(): (errorMessage?) => ArrayConstraint<ItemSchema>​

errorMessage?: string
Returns: ArrayConstraint<ItemSchema>