From 57898651e9aaa9777dfa8634a877df2f1e1c894f Mon Sep 17 00:00:00 2001 From: ndelvos78 Date: Wed, 25 Oct 2017 15:17:58 -0400 Subject: [PATCH] Added maxScale validation for length and precision fields (Members > Custom fields) as well. --- src/app/customers/customFields/services/field-form.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/customers/customFields/services/field-form.service.ts b/src/app/customers/customFields/services/field-form.service.ts index dc11d5a5..1db9c5d6 100644 --- a/src/app/customers/customFields/services/field-form.service.ts +++ b/src/app/customers/customFields/services/field-form.service.ts @@ -34,8 +34,8 @@ export class FieldFormService { hint: ['', [Validators.maxLength(512)]], description: ['', [Validators.maxLength(4096)]], mandatory: [''], - length: ['', [FimsValidators.minValue(1)]], - precision: ['', [FimsValidators.minValue(0)]], + length: ['', [FimsValidators.minValue(1), FimsValidators.maxScale(0)]], + precision: ['', [FimsValidators.minValue(0), FimsValidators.maxScale(0)]], minValue: ['', [FimsValidators.minValue(0)]], maxValue: ['', [FimsValidators.minValue(1)]], options: this.formBuilder.array([], optionValueUnique)