Skip to content

Commit

Permalink
chore: deprecate adapters for zod and valibot (#1065)
Browse files Browse the repository at this point in the history
standard schema libraries do not need an adapter anymore
  • Loading branch information
Balastrong authored Dec 11, 2024
1 parent c71544c commit af3f6b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/valibot-form-adapter/src/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ export function defaultFormTransformer(transformErrors: TransformFn) {
})
}

/**
* @deprecated With valibot 1.0.0 the adapter is no longer needed and will be soon removed.
* If you were passing some parameters you can use the `standardSchemaValidator` instead.
*/
export const valibotValidator =
(
params: Params = {},
Expand Down
4 changes: 4 additions & 0 deletions packages/zod-form-adapter/src/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export function defaultFormTransformer(transformErrors: TransformFn) {
})
}

/**
* @deprecated With zod 3.24.0 the adapter is no longer needed and will be soon removed.
* If you were passing some parameters you can use the `standardSchemaValidator` instead.
*/
export const zodValidator =
(params: Params = {}): Validator<unknown, ZodType> =>
() => {
Expand Down

0 comments on commit af3f6b3

Please sign in to comment.