MCPcopy Index your code
hub / github.com/autoNumeric/autoNumeric / _setValidState

Method _setValidState

src/AutoNumeric.js:6166–6178  ·  view source on GitHub ↗

* Set the valid state on the AutoNumeric element. * If the element is not an input, and therefore a contenteditable-enabled element, its validity state cannot be changed. * In that case, the invalid css class defined with the `settings.invalidClass` option is removed. * The 'autoNumer

()

Source from the content-addressed store, hash-verified

6164 * @private
6165 */
6166 _setValidState() {
6167 if (this.isInputElement) {
6168 AutoNumericHelper.setValidState(this.domElement);
6169 } else {
6170 this._removeCSSClass(this.settings.invalidClass);
6171 }
6172
6173 if (!this.validState) {
6174 this._triggerEvent(AutoNumeric.events.correctedValue, this.domElement);
6175 }
6176
6177 this.validState = true;
6178 }
6179
6180 /**
6181 * Sets the valid or invalid state on the DOM element, if the value is within the range set by the minimum and maximum value

Callers 1

Calls 3

_removeCSSClassMethod · 0.95
_triggerEventMethod · 0.95
setValidStateMethod · 0.80

Tested by

no test coverage detected