Files
Webklar.com/node_modules/@hookform/resolvers/nope/dist/nope.modern.mjs
Basilosaurusrex f027651f9b main repo
2025-11-24 18:09:40 +01:00

3 lines
448 B
JavaScript

import{toNestErrors as r,validateFieldsNatively as e}from"@hookform/resolvers";const o=(r,e={},s="")=>Object.keys(r).reduce((e,t)=>{const a=s?`${s}.${t}`:t,l=r[t];return"string"==typeof l?e[a]={message:l}:o(l,e,a),e},e),s=(s,t={abortEarly:!1})=>(a,l,n)=>{const i=s.validate(a,l,t);return i?{values:{},errors:r(o(i),n)}:(n.shouldUseNativeValidation&&e({},n),{values:a,errors:{}})};export{s as nopeResolver};
//# sourceMappingURL=nope.modern.mjs.map