refineMap()
refineMap<
KeySchema,ValueSchema>(schema,refinement):MapSchema<KeySchema,ValueSchema>
Adds a refinement to a map schema. Returns a base MapSchema - the caller is responsible for adding constraints.
Type Parameters
KeySchema: KeySchema extends GenericSchema
ValueSchema: ValueSchema extends GenericSchema
Parameters
schema: MapSchema<KeySchema, ValueSchema> | MapConstraint<KeySchema, ValueSchema>
refinement: (value) => string | true
Returns: MapSchema<KeySchema, ValueSchema>
Since
2.0.0