V2Wizard: Make e-mail validation case insensitive

Fixes #1554

Case validation for the e-mail field was previously case sensitive, disallowing uppercase letters. This updates the validation to accept both lower and upper case letters.
This commit is contained in:
regexowl 2024-05-07 09:53:31 +02:00 committed by Lucas Garfield
parent a6ff016662
commit 7ac505fc89

View file

@ -27,7 +27,7 @@ export const isAzureResourceGroupValid = (azureResourceGroup: string) => {
export const isGcpEmailValid = (gcpShareWithAccount: string | undefined) => {
return (
gcpShareWithAccount !== undefined &&
/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,12}$/.test(gcpShareWithAccount) &&
/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,12}$/i.test(gcpShareWithAccount) &&
gcpShareWithAccount.length <= 253
);
};