From 5f91b7432e84a245c57f1650fd101bfa73adb99b Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Tue, 6 Feb 2024 10:39:30 +0530 Subject: [PATCH] Adding maxLength validations Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mater-data-common-body.component.html | 2 ++ pmp-ui/src/assets/entity-spec/auth-policy.json | 9 ++++++--- pmp-ui/src/assets/entity-spec/data-share-policy.json | 9 ++++++--- pmp-ui/src/assets/entity-spec/device-detail.json | 6 ++++-- pmp-ui/src/assets/entity-spec/ftm-detail.json | 6 ++++-- pmp-ui/src/assets/entity-spec/policy-group.json | 6 ++++-- pmp-ui/src/assets/entity-spec/policy-mapping.json | 3 ++- pmp-ui/src/assets/entity-spec/sbi-detail.json | 3 ++- 8 files changed, 30 insertions(+), 14 deletions(-) diff --git a/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.html b/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.html index 31360846e..cd0491056 100644 --- a/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.html +++ b/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.html @@ -9,6 +9,7 @@ #{{field.name}} (keyup)="captureValue($event, field.name, 'primary')" matInput + [maxLength]="field.maxLength" placeholder="{{ field.label[primaryLang] | translate }}" @@ -38,6 +39,7 @@ #{{field.name}} (blur)="captureValue($event, field.name, 'primary')" matInput + [maxLength]="field.maxLength" placeholder="{{ field.label[primaryLang] | translate }}" diff --git a/pmp-ui/src/assets/entity-spec/auth-policy.json b/pmp-ui/src/assets/entity-spec/auth-policy.json index 1b8344d9b..704566fa7 100644 --- a/pmp-ui/src/assets/entity-spec/auth-policy.json +++ b/pmp-ui/src/assets/entity-spec/auth-policy.json @@ -101,7 +101,8 @@ "inputType": "text", "ismandatory": "true", "showInListView": "true", - "showInSingleView": "true" + "showInSingleView": "true", + "maxLength": 128 }, { "name": "desc", @@ -120,7 +121,8 @@ "inputType": "text", "ismandatory": "true", "showInListView": "true", - "showInSingleView": "true" + "showInSingleView": "true", + "maxLength": 256 }, { "name": "policyGroupName", @@ -196,7 +198,8 @@ "inputType": "textarea", "ismandatory": "true", "showInListView": "false", - "showInSingleView": "true" + "showInSingleView": "true", + "maxLength": 5120 }, { "name": "isActive", diff --git a/pmp-ui/src/assets/entity-spec/data-share-policy.json b/pmp-ui/src/assets/entity-spec/data-share-policy.json index 36f081371..e37c0ef2b 100644 --- a/pmp-ui/src/assets/entity-spec/data-share-policy.json +++ b/pmp-ui/src/assets/entity-spec/data-share-policy.json @@ -101,7 +101,8 @@ "inputType": "text", "ismandatory": "true", "showInListView": "true", - "showInSingleView": "true" + "showInSingleView": "true", + "maxLength": 128 }, { "name": "desc", @@ -120,7 +121,8 @@ "inputType": "text", "ismandatory": "true", "showInListView": "true", - "showInSingleView": "true" + "showInSingleView": "true", + "maxLength": 256 }, { "name": "policyGroupName", @@ -196,7 +198,8 @@ "inputType": "textarea", "ismandatory": "true", "showInListView": "false", - "showInSingleView": "true" + "showInSingleView": "true", + "maxLength": 5120 }, { "name": "isActive", diff --git a/pmp-ui/src/assets/entity-spec/device-detail.json b/pmp-ui/src/assets/entity-spec/device-detail.json index 386c01914..7ace2b117 100644 --- a/pmp-ui/src/assets/entity-spec/device-detail.json +++ b/pmp-ui/src/assets/entity-spec/device-detail.json @@ -192,7 +192,8 @@ "inputType": "text", "ismandatory": "true", "showInListView": "true", - "showInSingleView": "true" + "showInSingleView": "true", + "maxLength": 36 }, { "name": "model", @@ -211,7 +212,8 @@ "inputType": "text", "ismandatory": "true", "showInListView": "true", - "showInSingleView": "true" + "showInSingleView": "true", + "maxLength": 36 }, { "name": "isItForRegistrationDevice", diff --git a/pmp-ui/src/assets/entity-spec/ftm-detail.json b/pmp-ui/src/assets/entity-spec/ftm-detail.json index e8e5191d6..ec357a9dc 100644 --- a/pmp-ui/src/assets/entity-spec/ftm-detail.json +++ b/pmp-ui/src/assets/entity-spec/ftm-detail.json @@ -185,7 +185,8 @@ "inputType": "text", "ismandatory": "true", "showInListView": "true", - "showInSingleView": "true" + "showInSingleView": "true", + "maxLength": 36 }, { "name": "model", @@ -204,7 +205,8 @@ "inputType": "text", "ismandatory": "true", "showInListView": "true", - "showInSingleView": "true" + "showInSingleView": "true", + "maxLength": 36 }, { "name": "approvalStatus", diff --git a/pmp-ui/src/assets/entity-spec/policy-group.json b/pmp-ui/src/assets/entity-spec/policy-group.json index 8826ece17..4de6ff106 100644 --- a/pmp-ui/src/assets/entity-spec/policy-group.json +++ b/pmp-ui/src/assets/entity-spec/policy-group.json @@ -116,7 +116,8 @@ "inputType": "text", "ismandatory": "true", "showInListView": "true", - "showInSingleView": "true" + "showInSingleView": "true", + "maxLength": 128 }, { "name": "desc", @@ -135,7 +136,8 @@ "inputType": "text", "ismandatory": "true", "showInListView": "true", - "showInSingleView": "true" + "showInSingleView": "true", + "maxLength": 256 }, { "name": "isActive", diff --git a/pmp-ui/src/assets/entity-spec/policy-mapping.json b/pmp-ui/src/assets/entity-spec/policy-mapping.json index a26a3e2bf..406ce1f5a 100644 --- a/pmp-ui/src/assets/entity-spec/policy-mapping.json +++ b/pmp-ui/src/assets/entity-spec/policy-mapping.json @@ -174,7 +174,8 @@ "inputType": "text", "ismandatory": "true", "showInListView": "true", - "showInSingleView": "true" + "showInSingleView": "true", + "maxLength": 4000 }, { "name": "statusCode", diff --git a/pmp-ui/src/assets/entity-spec/sbi-detail.json b/pmp-ui/src/assets/entity-spec/sbi-detail.json index 53ff7a4a7..506ba14cf 100644 --- a/pmp-ui/src/assets/entity-spec/sbi-detail.json +++ b/pmp-ui/src/assets/entity-spec/sbi-detail.json @@ -153,7 +153,8 @@ "inputType": "text", "ismandatory": "true", "showInListView": "true", - "showInSingleView": "true" + "showInSingleView": "true", + "maxLength": 64 }, { "name": "swBinaryHash",