{ "version": 3, "sources": ["../../javascript/validation.js"], "sourcesContent": ["(function () {\n\t'use strict'\n\n\t// Fetch all the forms we want to apply custom Bootstrap validation styles to\n\tvar forms = document.querySelectorAll('.needs-validation')\n\n\t// Loop over them and prevent submission\n\tArray.prototype.slice.call(forms)\n\t\t.forEach(function (form) {\n\t\t\tform.addEventListener('submit', function (event) {\n\t\t\t\tvar formValidity = form.checkValidity()\n\t\t\t\tvar passwordConfirmation = validPasswordConfirmation()\n\t\t\t\tif (!formValidity || !passwordConfirmation) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}\n\n\t\t\t\tform.classList.add('was-validated')\n\t\t\t}, false)\n\t\t})\n})()\n\nfunction validPasswordConfirmation() {\n var password = document.getElementById('user_password');\n var confirmation = document.getElementById('user_password_confirmation');\n\n if (password.value != confirmation.value) {\n\t\tdocument.getElementById('password_confirmation_invalid').textContent = 'As senhas n\u00E3o coincidem'\n confirmation.value = '';\n return false;\n }\n\n\tdocument.getElementById('password_confirmation_invalid').textContent = 'Campo obrigat\u00F3rio, favor preencher'\n return true;\n}\n"], "mappings": ";;AAAA,GAAC,WAAY;AACZ;AAGA,QAAI,QAAQ,SAAS,iBAAiB,mBAAmB;AAGzD,UAAM,UAAU,MAAM,KAAK,KAAK,EAC9B,QAAQ,SAAU,MAAM;AACxB,WAAK,iBAAiB,UAAU,SAAU,OAAO;AAChD,YAAI,eAAe,KAAK,cAAc;AACtC,YAAI,uBAAuB,0BAA0B;AACrD,YAAI,CAAC,gBAAgB,CAAC,sBAAsB;AAC3C,gBAAM,eAAe;AACrB,gBAAM,gBAAgB;AAAA,QACvB;AAEA,aAAK,UAAU,IAAI,eAAe;AAAA,MACnC,GAAG,KAAK;AAAA,IACT,CAAC;AAAA,EACH,GAAG;AAEH,WAAS,4BAA4B;AACnC,QAAI,WAAW,SAAS,eAAe,eAAe;AACtD,QAAI,eAAe,SAAS,eAAe,4BAA4B;AAEvE,QAAI,SAAS,SAAS,aAAa,OAAO;AAC1C,eAAS,eAAe,+BAA+B,EAAE,cAAc;AACrE,mBAAa,QAAQ;AACrB,aAAO;AAAA,IACT;AAED,aAAS,eAAe,+BAA+B,EAAE,cAAc;AACtE,WAAO;AAAA,EACT;", "names": [] }