From 1996d53fe05f9569b31f411ee6861cd9fc5eca3c Mon Sep 17 00:00:00 2001 From: Sean Date: Tue, 19 Jul 2022 19:49:35 -0400 Subject: [PATCH] Fixes #5903 Add in form validation on "name" field when creating and editing backups. Checks if name conforms to dnsLabel and noUpperCase validation. --- shell/assets/translations/en-us.yaml | 1 + shell/edit/resources.cattle.io.backup.vue | 28 +++++++++++++++++++---- shell/utils/validators/formRules/index.ts | 3 +++ 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/shell/assets/translations/en-us.yaml b/shell/assets/translations/en-us.yaml index f3e6388f20..2b03363288 100644 --- a/shell/assets/translations/en-us.yaml +++ b/shell/assets/translations/en-us.yaml @@ -4853,6 +4853,7 @@ user: list: errorRefreshingGroupMemberships: Error refreshing group memberships validation: + noUpperCase: 'Alphanumeric characters in "{key}" must be lowercase' arrayLength: between: '"{key}" should contain between {min} and {max} {max, plural, =1 {item} other {items}}' exactly: '"{key}" should contain {count, plural, =1 {# item} other {# items}}' diff --git a/shell/edit/resources.cattle.io.backup.vue b/shell/edit/resources.cattle.io.backup.vue index aa8ddb8a88..d4a3690967 100644 --- a/shell/edit/resources.cattle.io.backup.vue +++ b/shell/edit/resources.cattle.io.backup.vue @@ -1,6 +1,7 @@