Change validation process (currently broken)

This commit is contained in:
Patrick Jentsch
2020-04-15 14:57:17 +02:00
parent b1d819444e
commit f264b27ae5
3 changed files with 17 additions and 8 deletions

View File

@ -133,6 +133,7 @@ nopaque.Forms.init = function() {
window.location.href = JSON.parse(this.responseText).redirect_url;
}
if (request.status === 400) {
console.log(request);
for (let [field, errors] of Object.entries(JSON.parse(this.responseText))) {
fieldElement = form.querySelector(`input[name="add-job-form-${field}"]`).closest(".input-field");
for (let error of errors) {