|
|
@ -232,9 +232,9 @@ export class Editor extends Single { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_checkToolTip() { |
|
|
|
_checkToolTip() { |
|
|
|
const { errorText } = this.options; |
|
|
|
let errorText = this.options.errorText; |
|
|
|
if (isFunction(errorText)) { |
|
|
|
if (isFunction(errorText)) { |
|
|
|
this.options.errorText = errorText(this.editor.getValue()); |
|
|
|
errorText = errorText(this.editor.getValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (isKey(errorText)) { |
|
|
|
if (isKey(errorText)) { |
|
|
|
if (!this.isEnabled() || this.isValid() || Bubbles.has(this.getName())) { |
|
|
|
if (!this.isEnabled() || this.isValid() || Bubbles.has(this.getName())) { |
|
|
@ -324,9 +324,10 @@ export class Editor extends Single { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_setErrorVisible(b) { |
|
|
|
_setErrorVisible(b) { |
|
|
|
const { errorText, autoTrim, simple } = this.options; |
|
|
|
const { autoTrim, simple } = this.options; |
|
|
|
|
|
|
|
let errorText = this.options.errorText; |
|
|
|
if (isFunction(errorText)) { |
|
|
|
if (isFunction(errorText)) { |
|
|
|
this.options.errorText = errorText(autoTrim ? trim(this.editor.getValue()) : this.editor.getValue()); |
|
|
|
errorText = errorText(autoTrim ? trim(this.editor.getValue()) : this.editor.getValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!this.disabledError && isKey(errorText)) { |
|
|
|
if (!this.disabledError && isKey(errorText)) { |
|
|
|
Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, { |
|
|
|
Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, { |
|
|
|