refineArray()
refineArray<
ItemSchema>(schema,refinement):ArraySchema<ItemSchema>
Adds a refinement to an array schema. Returns a base ArraySchema - the caller is responsible for adding constraints.
Type Parametersβ
ItemSchema: ItemSchema extends GenericSchemaβ
Parametersβ
schema: ArraySchema<ItemSchema> | ArrayConstraint<ItemSchema>β
refinement: (value) => string | trueβ
Returns: ArraySchema<ItemSchema>β
Sinceβ
2.0.0