We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// @ts-nocheck suppresses errors
oneOfSchemas.helper.ts
import * as Yup from "yup"; declare module "yup" { interface MixedSchema { oneOfSchemas(schemas: Array<Yup.Schema<any>>): this; } } Yup.addMethod<Yup.MixedSchema>( Yup.mixed, "oneOfSchemas", function (schemas: Array<Yup.Schema<any>>) { return this.test( "one-of-schemas", "Not all items in [object Object] match one of the allowed schemas", (item) => schemas.some((schema) => schema.isValidSync(item, { strict: true, }) ) ); } );
Not applicable
No response
Not Applicable
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug description
// @ts-nocheck suppresses errors
oneOfSchemas.helper.ts
How to reproduce
Not applicable
Expected behavior
No response
Prisma information
Not Applicable
Environment & setup
Prisma Version
Not Applicable
The text was updated successfully, but these errors were encountered: