@hookform/resolvers
Advanced tools
Comparing version 3.0.0 to 3.0.1
{ | ||
"name": "@hookform/resolvers", | ||
"amdName": "hookformResolvers", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "React Hook Form validation resolvers: Yup, Joi, Superstruct, Zod, Vest, Class Validator, io-ts, Nope, computed-types, TypeBox and Typanion", | ||
@@ -189,3 +189,3 @@ "main": "dist/resolvers.js", | ||
"devDependencies": { | ||
"@sinclair/typebox": "^0.25.24", | ||
"@sinclair/typebox": "^0.26.3", | ||
"@testing-library/dom": "^9.0.1", | ||
@@ -195,7 +195,7 @@ "@testing-library/jest-dom": "^5.16.5", | ||
"@testing-library/user-event": "^14.4.3", | ||
"@types/node": "^18.15.3", | ||
"@types/node": "^18.15.7", | ||
"@types/react": "^18.0.28", | ||
"@types/testing-library__jest-dom": "^5.14.5", | ||
"@typescript-eslint/eslint-plugin": "^5.55.0", | ||
"@typescript-eslint/parser": "^5.55.0", | ||
"@typescript-eslint/eslint-plugin": "^5.56.0", | ||
"@typescript-eslint/parser": "^5.56.0", | ||
"@vitejs/plugin-react": "^3.1.0", | ||
@@ -210,3 +210,3 @@ "ajv": "^8.12.0", | ||
"eslint": "^8.36.0", | ||
"eslint-config-prettier": "^8.7.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"fp-ts": "^2.13.1", | ||
@@ -216,3 +216,3 @@ "husky": "^8.0.3", | ||
"io-ts-types": "^0.5.19", | ||
"joi": "^17.8.4", | ||
"joi": "^17.9.1", | ||
"jsdom": "^21.1.1", | ||
@@ -225,6 +225,6 @@ "lint-staged": "^13.2.0", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^2.8.4", | ||
"prettier": "^2.8.7", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-hook-form": "^7.43.6", | ||
"react-hook-form": "^7.43.7", | ||
"reflect-metadata": "^0.1.13", | ||
@@ -235,5 +235,5 @@ "superstruct": "^1.0.3", | ||
"vest": "^4.6.9", | ||
"vite": "^4.2.0", | ||
"vite": "^4.2.1", | ||
"vite-tsconfig-paths": "^4.0.7", | ||
"vitest": "^0.29.3", | ||
"vitest": "^0.29.7", | ||
"yup": "^1.0.2", | ||
@@ -240,0 +240,0 @@ "zod": "^3.21.4" |
@@ -32,3 +32,3 @@ <div align="center"> | ||
mode: 'async' | 'sync', | ||
rawValues?: boolean | ||
raw?: boolean | ||
} | ||
@@ -498,9 +498,24 @@ | ||
## Organizations | ||
### Sponsors | ||
Thanks goes to these wonderful organizations! [[Contribute](https://opencollective.com/react-hook-form/contribute)]. | ||
Thanks go to these kind and lovely sponsors! | ||
<a href="https://github.com/react-hook-form/react-hook-form/graphs/contributors"> | ||
<img src="https://opencollective.com/react-hook-form/organizations.svg?width=950" /> | ||
<a target="_blank" href='https://wantedlyinc.com'> | ||
<img width="94" src="https://images.opencollective.com/wantedly/d94e44e/logo/256.png" /> | ||
</a> | ||
<a target="_blank" href='https://toss.im'> | ||
<img width="94" src="https://images.opencollective.com/toss/3ed69b3/logo/256.png" /> | ||
</a> | ||
<a target="_blank" href="https://graphcms.com"> | ||
<img width="94" src="https://avatars.githubusercontent.com/u/31031438" /> | ||
</a> | ||
<a target="_blank" href="https://www.beekai.com/"> | ||
<img width="94" src="https://www.beekai.com/marketing/logo/logo.svg" /> | ||
</a> | ||
<a target="_blank" href="https://kanamekey.com"> | ||
<img width="94" src="https://images.opencollective.com/kaname/d15fd98/logo/256.png" /> | ||
</a> | ||
<a target="_blank" href="https://formcarry.com/"> | ||
<img width="94" src="https://images.opencollective.com/formcarry/a40a4ea/logo/256.png" /> | ||
</a> | ||
@@ -507,0 +522,0 @@ ## Contributors |
@@ -1,2 +0,2 @@ | ||
var e=require("react-hook-form"),r=require("@hookform/resolvers"),t=require("@sinclair/typebox/value"),a=function(r,t){for(var a={};r.length;){var s=r[0],o=s.type,i=s.message,l=s.path.substring(1).replace(/\//g,".");if(a[l]||(a[l]={message:i,type:""+o}),t){var n=a[l].types,u=n&&n[""+o];a[l]=e.appendErrors(l,t,a,""+o,u?[].concat(u,s.message):s.message)}r.shift()}return a};exports.typeboxResolver=function(e){return function(s,o,i){try{var l=[].concat(t.Value.Errors(e,s));return i.shouldUseNativeValidation&&r.validateFieldsNatively({},i),Promise.resolve(l.length?{values:{},errors:r.toNestError(a(l,!i.shouldUseNativeValidation&&"all"===i.criteriaMode),i)}:{errors:{},values:s})}catch(e){return Promise.reject(e)}}}; | ||
var e=require("react-hook-form"),r=require("@hookform/resolvers"),a=require("@sinclair/typebox/value"),s=function(r,a){for(var s={};r.length;){var t=r[0],o=t.type,i=t.message,l=t.path.substring(1).replace(/\//g,".");if(s[l]||(s[l]={message:i,type:""+o}),a){var n=s[l].types,u=n&&n[""+o];s[l]=e.appendErrors(l,a,s,""+o,u?[].concat(u,t.message):t.message)}r.shift()}return s};exports.typeboxResolver=function(e){return function(t,o,i){try{var l=Array.from(a.Value.Errors(e,t));return i.shouldUseNativeValidation&&r.validateFieldsNatively({},i),Promise.resolve(l.length?{values:{},errors:r.toNestError(s(l,!i.shouldUseNativeValidation&&"all"===i.criteriaMode),i)}:{errors:{},values:t})}catch(e){return Promise.reject(e)}}}; | ||
//# sourceMappingURL=typebox.js.map |
@@ -1,2 +0,2 @@ | ||
import{appendErrors as r}from"react-hook-form";import{validateFieldsNatively as e,toNestError as o}from"@hookform/resolvers";import{Value as t}from"@sinclair/typebox/value";var a=function(e,o){for(var t={};e.length;){var a=e[0],s=a.type,i=a.message,n=a.path.substring(1).replace(/\//g,".");if(t[n]||(t[n]={message:i,type:""+s}),o){var l=t[n].types,c=l&&l[""+s];t[n]=r(n,o,t,""+s,c?[].concat(c,a.message):a.message)}e.shift()}return t},s=function(r){return function(s,i,n){try{var l=[].concat(t.Errors(r,s));return n.shouldUseNativeValidation&&e({},n),Promise.resolve(l.length?{values:{},errors:o(a(l,!n.shouldUseNativeValidation&&"all"===n.criteriaMode),n)}:{errors:{},values:s})}catch(r){return Promise.reject(r)}}};export{s as typeboxResolver}; | ||
import{appendErrors as r}from"react-hook-form";import{validateFieldsNatively as e,toNestError as o}from"@hookform/resolvers";import{Value as t}from"@sinclair/typebox/value";var a=function(e,o){for(var t={};e.length;){var a=e[0],s=a.type,i=a.message,n=a.path.substring(1).replace(/\//g,".");if(t[n]||(t[n]={message:i,type:""+s}),o){var l=t[n].types,m=l&&l[""+s];t[n]=r(n,o,t,""+s,m?[].concat(m,a.message):a.message)}e.shift()}return t},s=function(r){return function(s,i,n){try{var l=Array.from(t.Errors(r,s));return n.shouldUseNativeValidation&&e({},n),Promise.resolve(l.length?{values:{},errors:o(a(l,!n.shouldUseNativeValidation&&"all"===n.criteriaMode),n)}:{errors:{},values:s})}catch(r){return Promise.reject(r)}}};export{s as typeboxResolver}; | ||
//# sourceMappingURL=typebox.module.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react-hook-form"),require("@hookform/resolvers"),require("@sinclair/typebox/value")):"function"==typeof define&&define.amd?define(["exports","react-hook-form","@hookform/resolvers","@sinclair/typebox/value"],r):r((e||self).hookformResolversTypebox={},e.ReactHookForm,e.hookformResolvers,e.value)}(this,function(e,r,o,t){var s=function(e,o){for(var t={};e.length;){var s=e[0],a=s.type,i=s.message,n=s.path.substring(1).replace(/\//g,".");if(t[n]||(t[n]={message:i,type:""+a}),o){var l=t[n].types,f=l&&l[""+a];t[n]=r.appendErrors(n,o,t,""+a,f?[].concat(f,s.message):s.message)}e.shift()}return t};e.typeboxResolver=function(e){return function(r,a,i){try{var n=[].concat(t.Value.Errors(e,r));return i.shouldUseNativeValidation&&o.validateFieldsNatively({},i),Promise.resolve(n.length?{values:{},errors:o.toNestError(s(n,!i.shouldUseNativeValidation&&"all"===i.criteriaMode),i)}:{errors:{},values:r})}catch(e){return Promise.reject(e)}}}}); | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react-hook-form"),require("@hookform/resolvers"),require("@sinclair/typebox/value")):"function"==typeof define&&define.amd?define(["exports","react-hook-form","@hookform/resolvers","@sinclair/typebox/value"],r):r((e||self).hookformResolversTypebox={},e.ReactHookForm,e.hookformResolvers,e.value)}(this,function(e,r,o,t){var s=function(e,o){for(var t={};e.length;){var s=e[0],a=s.type,i=s.message,l=s.path.substring(1).replace(/\//g,".");if(t[l]||(t[l]={message:i,type:""+a}),o){var n=t[l].types,f=n&&n[""+a];t[l]=r.appendErrors(l,o,t,""+a,f?[].concat(f,s.message):s.message)}e.shift()}return t};e.typeboxResolver=function(e){return function(r,a,i){try{var l=Array.from(t.Value.Errors(e,r));return i.shouldUseNativeValidation&&o.validateFieldsNatively({},i),Promise.resolve(l.length?{values:{},errors:o.toNestError(s(l,!i.shouldUseNativeValidation&&"all"===i.criteriaMode),i)}:{errors:{},values:r})}catch(e){return Promise.reject(e)}}}}); | ||
//# sourceMappingURL=typebox.umd.js.map |
@@ -43,3 +43,3 @@ import { appendErrors, FieldError, FieldErrors } from 'react-hook-form'; | ||
(schema) => async (values, _, options) => { | ||
const errors = [...Value.Errors(schema, values)]; | ||
const errors = Array.from(Value.Errors(schema, values)); | ||
@@ -46,0 +46,0 @@ options.shouldUseNativeValidation && validateFieldsNatively({}, options); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
470616
527