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>