luci-base: cbi.js: support field validation for formless inputs
JS CBI fields have no parent form element anymore. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
6b8701c7bf
commit
4a9f784a2a
1 changed files with 1 additions and 1 deletions
|
@ -260,7 +260,7 @@ var CBIValidatorPrototype = {
|
|||
|
||||
validate: function() {
|
||||
/* element is detached */
|
||||
if (!findParent(this.field, 'form'))
|
||||
if (!findParent(this.field, 'body'))
|
||||
return true;
|
||||
|
||||
this.field.classList.remove('cbi-input-invalid');
|
||||
|
|
Loading…
Reference in a new issue