mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
new pregmatch for user function
This commit is contained in:
parent
2d7b0ad1f2
commit
1aa19c01a0
1 changed files with 2 additions and 1 deletions
|
@ -556,7 +556,8 @@ validate_format_email() {
|
|||
|
||||
# Username
|
||||
validate_format_username() {
|
||||
if ! [[ "$1" =~ ^[0-z]+(\.[0-z]+)?$ ]] || [[ "${#1}" -gt 28 ]]; then
|
||||
if ! [[ "$1" =~ ^[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)?$ ]] || [[ "${#1}" -gt 28 ]]
|
||||
then
|
||||
echo "Error: $2 $1 is not valid"
|
||||
log_event "$E_INVALID" "$EVENT"
|
||||
exit $E_INVALID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue