styling rest of page

This commit is contained in:
Fran Jurmanović
2021-06-13 19:30:05 +02:00
parent 7596c832d7
commit 3caaea8b26
24 changed files with 318 additions and 200 deletions

View File

@@ -12,7 +12,7 @@ class Validator {
}
get name() {
return this.input?.name;
return this.input?.label ? this.input?.label : this.input?.name;
}
get error() {
@@ -69,13 +69,17 @@ class Validator {
}
}
if (!valid) {
const error = validatorErrors[rule]?.replaceAll('{- name}', firstUpper(this.name?.toString()));
this.error = ruleArray ? validRule?.[1]?.replaceAll('{- name}', firstUpper(this.name?.toString())) : error;
const error = ruleArray
? validRule?.[1]?.replaceAll('{- name}', firstUpper(this.name?.toString()))
: validatorErrors[rule]?.replaceAll('{- name}', firstUpper(this.name?.toString()));
if (error) {
this.error = error;
}
}
return valid;
});
const _return = validArr?.includes(false);
if (_return) {
if (!_return) {
this.error = null;
}
this.valid = !_return;