omit()
omit<
T,K>(schema,keys,message?):OmitSchema<ObjectSchema<T>,K>
Omit transform - excludes specific properties.
Type Parametersโ
T: T extends Record<string, GenericSchema>โ
K: K extends string | number | symbolโ
Parametersโ
schema: ObjectSchema<T> | ObjectConstraint<T> | { entries: T; }โ
Source object schema.
keys: readonly K[]โ
Keys to exclude.
message?: stringโ
Custom error message.
Returns: OmitSchema<ObjectSchema<T>, K>โ
Schema without excluded properties.
Sinceโ
2.0.0