From a2a7edb32beccd0ec05c492b75f7ff2b800624dd Mon Sep 17 00:00:00 2001 From: deetz99 Date: Fri, 13 Dec 2024 16:06:03 -0800 Subject: [PATCH] set max length for all inputs --- strr-base-web/.eslintrc | 3 ++- strr-base-web/app/components/connect/form/address/Index.vue | 4 ++++ strr-base-web/app/components/connect/form/field/Group.vue | 4 +++- strr-base-web/app/components/connect/form/field/Index.vue | 4 +++- .../app/components/connect/form/phoneNumber/Index.vue | 2 +- strr-base-web/app/components/form/common/Contact.vue | 2 +- .../app/components/form/UnitAddress/AutoComplete.vue | 1 + strr-host-pm-web/app/components/form/UnitAddress/Manual.vue | 4 ++++ strr-host-pm-web/package.json | 2 +- strr-platform-web/package.json | 2 +- strr-strata-web/package.json | 2 +- 11 files changed, 22 insertions(+), 8 deletions(-) diff --git a/strr-base-web/.eslintrc b/strr-base-web/.eslintrc index 141577c5..a54bcd0e 100644 --- a/strr-base-web/.eslintrc +++ b/strr-base-web/.eslintrc @@ -23,7 +23,8 @@ "app-inner-container", "connect-date-picker", "connect-date-picker__err", - "prose-bcGov" + "prose-bcGov", + "max-w-bcGovInput" ] }], "no-use-before-define": "off" diff --git a/strr-base-web/app/components/connect/form/address/Index.vue b/strr-base-web/app/components/connect/form/address/Index.vue index 9d256d9e..fa5ba298 100644 --- a/strr-base-web/app/components/connect/form/address/Index.vue +++ b/strr-base-web/app/components/connect/form/address/Index.vue @@ -207,6 +207,7 @@ const addId = useId() :aria-invalid="error !== undefined" :aria-describedby="schemaPrefix + 'street-' + addId" :disabled="disabledFields?.includes('street')" + maxlength="1000" @keypress.once="addressComplete(id + '-street')" @click="addressComplete(id + '-street')" /> @@ -236,6 +237,7 @@ const addId = useId() :placeholder="$t('label.line2')" :aria-label="$t('label.line2')" :disabled="disabledFields?.includes('streetAdditional')" + maxlength="1000" />
@@ -288,6 +290,7 @@ const addId = useId() :aria-invalid="error !== undefined" :aria-describedby="schemaPrefix + 'region-' + addId" :disabled="disabledFields?.includes('region')" + maxlength="1000" /> @@ -329,6 +332,7 @@ const addId = useId() :disabled="disabledFields?.includes('locationDescription')" class="w-full" data-testid="address-location-description" + maxlength="1000" />
diff --git a/strr-base-web/app/components/connect/form/field/Group.vue b/strr-base-web/app/components/connect/form/field/Group.vue index d5ca6a76..93879206 100644 --- a/strr-base-web/app/components/connect/form/field/Group.vue +++ b/strr-base-web/app/components/connect/form/field/Group.vue @@ -20,7 +20,8 @@ const props = defineProps({ size: { type: String, default: 'lg' }, ariaLabel: { type: String, default: undefined }, type: { type: String, default: 'text' }, - mask: { type: String, default: undefined } + mask: { type: String, default: undefined }, + maxlength: { type: Number, default: 1000 } }) const inputId = useId() @@ -46,6 +47,7 @@ const errorId = `${props.name}-error-${inputId}` :error-id="errorId" :aria-label="ariaLabel" size="lg" + :maxlength /> diff --git a/strr-base-web/app/components/connect/form/field/Index.vue b/strr-base-web/app/components/connect/form/field/Index.vue index ed59ba8e..6b9e005a 100644 --- a/strr-base-web/app/components/connect/form/field/Index.vue +++ b/strr-base-web/app/components/connect/form/field/Index.vue @@ -13,7 +13,8 @@ defineProps({ errorId: { type: String, default: undefined }, ariaLabel: { type: String, default: undefined }, type: { type: String, default: 'text' }, - mask: { type: String, default: undefined } + mask: { type: String, default: undefined }, + maxlength: { type: Number, default: 1000 } }) defineExpose({ model }) @@ -36,6 +37,7 @@ defineExpose({ model }) :aria-invalid="isInvalid" :aria-describedby="helpId" :aria-label="ariaLabel" + :maxlength /> diff --git a/strr-base-web/app/components/connect/form/phoneNumber/Index.vue b/strr-base-web/app/components/connect/form/phoneNumber/Index.vue index a8702333..9a38522a 100644 --- a/strr-base-web/app/components/connect/form/phoneNumber/Index.vue +++ b/strr-base-web/app/components/connect/form/phoneNumber/Index.vue @@ -19,7 +19,7 @@ const phoneId = useId() defineExpose({ number })