refineSet()
refineSet<
ItemSchema>(schema,refinement):SetSchema<ItemSchema>
Adds a refinement to a set schema. Returns a base SetSchema - the caller is responsible for adding constraints.
Type Parameters
ItemSchema: ItemSchema extends GenericSchema
Parameters
schema: SetSchema<ItemSchema> | SetConstraint<ItemSchema>
refinement: (value) => string | true
Returns: SetSchema<ItemSchema>
Since
2.0.0