diff --git a/src/widget/singleslider/singleslider.js b/src/widget/singleslider/singleslider.js index eb0a700c7..df1c958d6 100644 --- a/src/widget/singleslider/singleslider.js +++ b/src/widget/singleslider/singleslider.js @@ -16,7 +16,8 @@ BI.SingleSlider = BI.inherit(BI.Single, { props: { baseCls: "bi-single-slider bi-slider-track", digit: false, - unit: "" + unit: "", + errorText: "" }, render: function () { @@ -315,14 +316,18 @@ BI.SingleSlider = BI.inherit(BI.Single, { this.min = 0; this.max = 0; this._setBlueTrack(0); - }, populate: function () { + var o = this.options; if (!isNaN(this.min) && !isNaN(this.max)) { this._setVisible(true); this.enable = true; - this.label.setErrorText(BI.i18nText("BI-Basic_Please_Enter_Number_Between", this.min, this.max)); + if (BI.isNotEmptyString(o.errorText)) { + this.label.setErrorText(o.errorText); + } else { + this.label.setErrorText(BI.i18nText("BI-Basic_Please_Enter_Number_Between", this.min, this.max)); + } if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) { this.label.setValue(this.value); this._setAllPosition(this._getPercentByValue(this.value));