Skip to content

Commit dff7be3

Browse files
add ajv-formats for ajvResolver
1 parent 79cd8b2 commit dff7be3

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

ajv/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"react-hook-form": "^7.55.0",
1515
"@hookform/resolvers": "^2.0.0",
1616
"ajv": "^8.12.0",
17-
"ajv-errors": "^3.0.0"
17+
"ajv-errors": "^3.0.0",
18+
"ajv-formats": "^2.1.1"
1819
}
1920
}

ajv/src/ajv.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { toNestErrors, validateFieldsNatively } from '@hookform/resolvers';
22
import Ajv, { DefinedError } from 'ajv';
33
import ajvErrors from 'ajv-errors';
4+
import addFormats from 'ajv-formats';
45
import { FieldError, appendErrors } from 'react-hook-form';
56
import { AjvError, Resolver } from './types';
67

@@ -93,6 +94,7 @@ export const ajvResolver: Resolver =
9394
);
9495

9596
ajvErrors(ajv);
97+
addFormats(ajv);
9698

9799
const validate = ajv.compile(
98100
Object.assign(

bun.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@
282282
"@vitejs/plugin-react": "^4.3.4",
283283
"ajv": "^8.17.1",
284284
"ajv-errors": "^3.0.0",
285+
"ajv-formats": "^2.1.1",
285286
"arktype": "2.0.4",
286287
"check-export-map": "^1.3.1",
287288
"class-transformer": "^0.5.1",

0 commit comments

Comments
 (0)