mirror of
https://github.com/gotson/komga.git
synced 2026-05-09 05:10:19 +02:00
add rule sameAsIgnoreCase for confirmation dialog
This commit is contained in:
parent
f105fcebe6
commit
8653c4f3e8
2 changed files with 7 additions and 1 deletions
|
|
@ -42,7 +42,7 @@
|
|||
</slot>
|
||||
|
||||
<v-text-field
|
||||
:rules="[['sameAs', validateText]]"
|
||||
:rules="[['sameAsIgnoreCase', validateText]]"
|
||||
hide-details
|
||||
class="mt-2"
|
||||
autofocus
|
||||
|
|
|
|||
|
|
@ -79,6 +79,12 @@ export const vuetifyRulesPlugin = createRulesPlugin(
|
|||
sameAs: (other?: string, err?: string) => {
|
||||
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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue