From 8653c4f3e8d2dfa74e5fe6f728c6ef43aba701ea Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Mon, 22 Sep 2025 16:53:53 +0800 Subject: [PATCH] add rule sameAsIgnoreCase for confirmation dialog --- next-ui/src/components/dialog/Confirm.vue | 2 +- next-ui/src/plugins/vuetify.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/next-ui/src/components/dialog/Confirm.vue b/next-ui/src/components/dialog/Confirm.vue index 61044c4e..fc8b6fbe 100644 --- a/next-ui/src/components/dialog/Confirm.vue +++ b/next-ui/src/components/dialog/Confirm.vue @@ -42,7 +42,7 @@ { return (v: unknown) => other === v || err || 'Field must have the same value' }, + sameAsIgnoreCase: (other?: string, err?: string) => { + return (v: unknown) => + other?.localeCompare(String(v), undefined, { sensitivity: 'accent' }) == 0 || + err || + 'Field must have the same value' + }, }, }, vuetify.locale,