refactor(otp-generator): coerce lowercase secret characters to uppercase

This commit is contained in:
Corentin Thomasset
2023-03-26 22:40:43 +02:00
committed by Corentin THOMASSET
parent f3b1863f09
commit 7c40539ef9
3 changed files with 7 additions and 2 deletions

View File

@@ -96,7 +96,7 @@ const { attrs: secretValidationAttrs } = useValidation({
rules: [
{
message: 'Secret should be a base32 string',
validator: (value) => value.match(/^[A-Z234567]+$/),
validator: (value) => value.toUpperCase().match(/^[A-Z234567]+$/),
},
{
message: 'Please set a secret',