Function validateWithError
- validateWithError<T>(schema, data, options?): Promise<T["__outputType"]>
-
Type Parameters
-
T extends ObjectSchema<any, AnyObject, any, "", T>
Parameters
-
schema: T
-
data: unknown
-
Optional
options: ValidateOptions<any>
Returns Promise<T["__outputType"]>
Same functionality as the yup validate function, but throws a BadRequestHttpError if there is an error.