tuain-ng-forms-lib 15.0.21 → 15.0.23

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.
@@ -859,6 +859,7 @@ class FieldDescriptor extends FormElement {
859
859
  this.defaultEditable = this.enabled;
860
860
  this.required = fld.required ?? false;
861
861
  this.outputOnly = fld.outputOnly ?? false;
862
+ this.minLength = fld.minLength ?? 0;
862
863
  this.maxLength = fld.maxLength || (this._captureType === 'TEXTAREA' ? BIG_MAX_LENGTH : STD_MAX_LENGTH);
863
864
  this.intrinsicErrorMessage = this._formConfig?.fieldValidations?.[this._fieldType]?.message
864
865
  ?? this._formConfig?.fieldValidations?.DEFAULT?.message ?? '';
@@ -930,7 +931,9 @@ class FieldDescriptor extends FormElement {
930
931
  this.setAttr(attrs$1._maxValue, maxValue);
931
932
  }
932
933
  get minLength() { return this._minLength; }
933
- set minLength(requiredMinLength) { this.setAttr(attrs$1._minLength, requiredMinLength ? +requiredMinLength : null); }
934
+ set minLength(requiredMinLength) {
935
+ this.setAttr(attrs$1._minLength, requiredMinLength ? +requiredMinLength : null);
936
+ }
934
937
  get minValue() { return this._minValue; }
935
938
  set minValue(inputMinValue) {
936
939
  let minValue = inputMinValue;
@@ -3276,9 +3279,6 @@ class BasicFormComponent extends FormStructureAndData {
3276
3279
  return true;
3277
3280
  }
3278
3281
  async startFieldValidation(code, intrinsicValidation = true) {
3279
- console.log('startFieldValidation');
3280
- console.log(code);
3281
- console.log(intrinsicValidation);
3282
3282
  this.notifyFormActivity();
3283
3283
  const fieldToValidate = this.getField(code);
3284
3284
  if (!fieldToValidate) {
@@ -3290,24 +3290,14 @@ class BasicFormComponent extends FormStructureAndData {
3290
3290
  for (const validationMethod of validationCallbacks) {
3291
3291
  const { callback, properties } = validationMethod;
3292
3292
  const clientValidationPromise = callback(fieldToValidate);
3293
- console.log('validationMethod');
3294
- console.log({ callback, properties });
3295
3293
  clientValidationPromises.push(clientValidationPromise);
3296
3294
  }
3297
- console.log('clientValidationPromises');
3298
- console.log(clientValidationPromises);
3299
3295
  const clientValidationResults = await Promise.all(clientValidationPromises);
3300
- console.log('clientValidationResults');
3301
- console.log(clientValidationResults);
3302
3296
  const continueValidation = clientValidationResults.reduce((total, curr) => (total && (curr !== false)), true);
3303
- console.log('continueValidation');
3304
- console.log(continueValidation);
3305
3297
  if (!continueValidation) {
3306
3298
  return;
3307
3299
  }
3308
3300
  }
3309
- console.log('intrinsicValidation');
3310
- console.log(intrinsicValidation);
3311
3301
  if (intrinsicValidation) {
3312
3302
  this.startServerFieldValidation(fieldToValidate);
3313
3303
  }