fix formatting
gitea/wcs/pipeline/head This commit looks good Details

This commit is contained in:
Corentin Sechet 2023-04-17 18:13:19 +02:00
parent db30896e2d
commit 2cae6d3bf7
1 changed files with 14 additions and 14 deletions

View File

@ -834,23 +834,23 @@ const LiveValidation = (function(){
}
async toggleStatus(field) {
if (excludedField(field)) return
const attrError = hasAttrError(field);
if(attrError) {
this.showError(field, attrError)
if (excludedField(field)) return
const attrError = hasAttrError(field)
if(attrError) {
this.showError(field, attrError)
}
else {
const serverError = this.widget.dataset.supportsLiveValidation
? await hasServerError(this.name, field, field.form, this.checkUrl)
: false
if (serverError) {
const [error, overrideMsg] = serverError
this.showError(field, error, overrideMsg)
}
else {
const serverError = this.widget.dataset.supportsLiveValidation
? await hasServerError(this.name, field, field.form, this.checkUrl)
: false
if (serverError) {
const [error, overrideMsg] = serverError
this.showError(field, error, overrideMsg)
}
else {
this.removeError(field)
}
this.removeError(field)
}
}
}
showError(field, error, overrideMsg) {