Added at simbol to username pattern (#5835)

This commit is contained in:
MatteoBiscosi 2021-09-02 18:21:03 +02:00
parent 61057e9b83
commit b697113866
5 changed files with 10 additions and 4 deletions

View file

@ -2888,6 +2888,12 @@ function hasKey(key, theTable)
return(true)
end
end
function getUsernameInputPattern()
-- maximum len must be kept in sync with MAX_PASSWORD_LEN
return [[^(?=[a-zA-Z0-9._@!-?]{3,30}$)(?!.*[_.]{2})[^_.].*[^_.]$]]
end
function getPasswordInputPattern()
-- maximum len must be kept in sync with MAX_PASSWORD_LEN
return [[^[\w\$\\!\/\(\)= \?\^\*@_\-\u0000-\u0019\u0021-\u00ff]{5,31}$]]