tuain-ng-forms-lib 14.0.11 → 14.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -569,6 +569,7 @@ const fldAttr = {
|
|
|
569
569
|
minValue: '_minValue',
|
|
570
570
|
maxValue: '_maxValue',
|
|
571
571
|
maxLength: '_maxLength',
|
|
572
|
+
minLength: '_minLength',
|
|
572
573
|
onValidation: '_onValidation',
|
|
573
574
|
focus: 'focus',
|
|
574
575
|
intrinsicErrorMessage: '_intrinsicErrorMessage',
|
|
@@ -686,7 +687,7 @@ class FieldDescriptor extends FormElement {
|
|
|
686
687
|
set minLength(requiredMinLength) {
|
|
687
688
|
let newMinLength = +requiredMinLength;
|
|
688
689
|
newMinLength = (isNaN(newMinLength) || newMinLength < 0) ? 0 : newMinLength;
|
|
689
|
-
this.setAttr(fldAttr.
|
|
690
|
+
this.setAttr(fldAttr.minLength, newMinLength);
|
|
690
691
|
}
|
|
691
692
|
get maxLength() { return (this._maxLength > 0) ? this._maxLength.toString() : ''; }
|
|
692
693
|
set maxLength(requiredMaxLength) {
|
|
@@ -717,7 +718,7 @@ class FieldDescriptor extends FormElement {
|
|
|
717
718
|
intrinsicValidation = validation(fieldValue, this);
|
|
718
719
|
}
|
|
719
720
|
if (!intrinsicValidation) {
|
|
720
|
-
this.setError('99', this._intrinsicErrorMessage);
|
|
721
|
+
this.setError('99', message ?? this._intrinsicErrorMessage);
|
|
721
722
|
}
|
|
722
723
|
}
|
|
723
724
|
if (intrinsicValidation && fieldValue && this._minValue && fieldValue < this._minValue) {
|