Added password check to modify TFA setup

This commit is contained in:
Spitap
2023-06-30 16:28:10 +02:00
parent 399eaf5709
commit b03af24338
9 changed files with 243 additions and 52 deletions
+7
View File
@@ -15,6 +15,13 @@ extend('numeric', {
...numeric,
message: () => $gettext('This field must be a valid number')
})
extend('minmax', {
validate: async (value, args) => {
return value.length >= args.length && value.length <= args.length
},
params: ['length'],
message: $gettext('This field must have a length of {length} characters')
})
extend('required', {
...required,
message: () => $gettext('This field is required')