fix formatting
gitea/wcs/pipeline/head This commit looks good
Details
gitea/wcs/pipeline/head This commit looks good
Details
This commit is contained in:
parent
db30896e2d
commit
2cae6d3bf7
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue