Update main.lib.php
- Username can only contain letters, numbers and 1 underscore.
This commit is contained in:
parent
1aab02cabf
commit
36df32236c
@ -110,6 +110,10 @@ function validate() {
|
|||||||
if (($fppwd) != ($fppwd2)) {
|
if (($fppwd) != ($fppwd2)) {
|
||||||
$err [] = "Passwords did not match";
|
$err [] = "Passwords did not match";
|
||||||
}
|
}
|
||||||
|
if (!(preg_match('/^[a-zA-Z0-9]+_?[a-zA-Z0-9]+$/D', $fpuser) || preg_match('/^[a-zA-Z0-9]+_?[a-zA-Z0-9]+$/D', $fpuser))) {
|
||||||
|
$err [] = $fpuser . " is not a valid username.
|
||||||
|
Username can only contain letters, numbers and 1 underscore.";
|
||||||
|
}
|
||||||
if (!(preg_match('!@.*@|\.\.|\,|\;!', $email) || preg_match('!^.+\@(\[?)[a-zA-Z0-9\.\-]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$!', $email))) {
|
if (!(preg_match('!@.*@|\.\.|\,|\;!', $email) || preg_match('!^.+\@(\[?)[a-zA-Z0-9\.\-]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$!', $email))) {
|
||||||
$err [] = $email . " is not a valid email address";
|
$err [] = $email . " is not a valid email address";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user