mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
Fix regex
This commit is contained in:
parent
09fff14917
commit
6f871d545c
@ -2,7 +2,7 @@
|
|||||||
if (isset($_POST['name'], $_POST['table'])) {
|
if (isset($_POST['name'], $_POST['table'])) {
|
||||||
$name = $_POST['name'];
|
$name = $_POST['name'];
|
||||||
// validate user input
|
// validate user input
|
||||||
if (strlen($name) > 16 || !preg_match("/^[0-9a-zA-Z_]$/", $name)) {
|
if (strlen($name) > 16 || !preg_match("/^[0-9a-zA-Z_]{1,16}$/", $name)) {
|
||||||
echo('Invalid name.');
|
echo('Invalid name.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user