Merge pull request #4285 from olivergondza/unify-js-validation

[JENKINS-59605] Unify the JS validation behavior and the AJAX one
This commit is contained in:
Oleg Nenashev authored and GitHub committed 2019-10-12 08:20:40 +02:00
commit ef85b89323
1 file changed
+1 -1
@@ -495,7 +495,7 @@ function registerRegexpValidator(e,regexp,message) {
e.onchange = function() {
var set = oldOnchange != null ? oldOnchange.call(this) : false;
if (this.value.match(regexp)) {
if (!set) this.targetElement.innerHTML = "";
if (!set) this.targetElement.innerHTML = "<div/>";
} else {
this.targetElement.innerHTML = "<div class=error>" + message + "</div>";
set = true;