refineObject()
refineObject<
T>(schema,refinement):ObjectSchema<T>
Adds a refinement to an object schema. Returns a base ObjectSchema - the caller is responsible for adding constraints.
Type Parameters
T: T extends Record<string, GenericSchema>
Parameters
schema: ObjectSchema<T> | ObjectConstraint<T>
refinement: (value) => string | true
Returns: ObjectSchema<T>
Since
2.0.0