!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react-hook-form")):"function"==typeof define&&define.amd?define(["exports","react-hook-form"],r):r((e||self).hookformResolvers={},e.ReactHookForm)}(this,function(e,r){var t=function(e,t,o){if(e&&"reportValidity"in e){var i=r.get(o,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},o=function(e,r){var o=function(o){var i=r.fields[o];i&&i.ref&&"reportValidity"in i.ref?t(i.ref,o,e):i&&i.refs&&i.refs.forEach(function(r){return t(r,o,e)})};for(var i in r.fields)o(i)},i=function(e,r){var t=n(r).replace(/[.*+?^${}()|\\]/g,"\\$&");return e.some(function(e){return n(e).match("^"+t+"\\.\\d+")})};function n(e){return e.replace(/[\[\]]/g,"")}e.toNestErrors=function(e,t){t.shouldUseNativeValidation&&o(e,t);var n={};for(var f in e){var s=r.get(t.fields,f),a=Object.assign(e[f]||{},{ref:s&&s.refs?s.refs[0]:s&&s.ref});if(i(t.names||Object.keys(e),f)){var c=Object.assign({},r.get(n,f));r.set(c,"root",a),r.set(n,f,c)}else r.set(n,f,a)}return n},e.validateFieldsNatively=o});
//# sourceMappingURL=resolvers.umd.js.map
