UNPKG

@hookform/resolvers

Version:

React Hook Form validation resolvers: Yup, Joi, Superstruct, Zod, Vest, Class Validator, io-ts, Nope, computed-types, TypeBox, arktype and Typanion

3 lines (2 loc) 706 B
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@hookform/resolvers")):"function"==typeof define&&define.amd?define(["exports","@hookform/resolvers"],o):o((e||self).hookformResolversArktype={},e.hookformResolvers)}(this,function(e,o){var r=function(e){for(var o={};e.length;){var r=e[0],s=r.path.join(".");o[s]||(o[s]={message:r.message,type:r.code}),e.shift()}return o};e.arktypeResolver=function(e,s,t){return void 0===t&&(t={}),function(s,n,i){var a=e(s);return a.problems?{values:{},errors:o.toNestError(r(a.problems),i)}:(i.shouldUseNativeValidation&&o.validateFieldsNatively({},i),{errors:{},values:t.raw?s:a.data})}}}); //# sourceMappingURL=arktype.umd.js.map