src/aria/widgets/form/TextInput.js
function () {
            var cfg = this._cfg;

            // invalid text and value shouldn't be set at the same time
            var text = cfg.invalidText || "";

            if (text && cfg.value) {
                // There's both a value and an invalid text, prefer the value
                this.setProperty("invalidText", null);
                text = "";
            }

            // Validate the value in the configuration
            var res = this.checkValue({
                text : text,
                value : cfg.value,
                performCheckOnly : true
            });

            if (res.report) {
                var report = res.report;
                if (!text && report.text != null) {
                    text = '' + report.text; // String cast of valid value
                }
                report.$dispose();
            }
            if (!text) {
                text = this._getPrefilledText(cfg.prefill);
            }

            return text;
        }
function () {
            var cfg = this._cfg;

            // invalid text and value shouldn't be set at the same time
            var text = cfg.invalidText || "";

            if (text && cfg.value) {
                // There's both a value and an invalid text, prefer the value
                this.setProperty("invalidText", null);
                text = "";
            }

            // Validate the value in the configuration
            var res = this.checkValue({
                text : text,
                value : cfg.value,
                performCheckOnly : true
            });

            if (res.report) {
                var report = res.report;
                if (!text && report.text != null) {
                    text = '' + report.text; // String cast of valid value
                }
                report.$dispose();
            }
            if (!text) {
                text = this._getPrefilledText(cfg.prefill);
            }

            return text;
        }
function ( ) { var cfg = this . _cfg ; // invalid text and value shouldn't be set at the same time var text = cfg . invalidText || "" ; if ( text && cfg . value ) { // There's both a value and an invalid text, prefer the value this . setProperty ( "invalidText" , null ) ; text = "" ; } // Validate the value in the configuration var res = this . checkValue ( { text : text , value : cfg . value , performCheckOnly : true } ) ; if ( res . report ) { var report = res . report ; if ( ! text && report . text != null ) { text = '' + report . text ; // String cast of valid value } report . $dispose ( ) ; } if ( ! text ) { text = this . _getPrefilledText ( cfg . prefill ) ; } return text ; }
Get the text value of the input field. If available it tries to use the internal valid value, otherwise uses
the invalid text. If none of them is a non empty string it return the prefilled value. This method doesn't
handle helptext, as this value is not just text but also style.
@return {String}
Get the text value of the input field . If available it tries to use the internal valid value otherwise uses the invalid text . If none of them is a non empty string it return the prefilled value . This method doesn t handle helptext as this value is not just text but also style .