1
0
Fork 0

Add validation regex for new identity's name

master
Anonymous Contributor 2023-08-23 18:16:35 +02:00
parent e192d3fd04
commit f073fb621d
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@
} }
else if(isset($_POST['createIdent'])) { else if(isset($_POST['createIdent'])) {
$validator = new FormValidator(array( $validator = new FormValidator(array(
'newName' => array('required' => true, 'regex' => '') 'newName' => array('required' => true, 'regex' => '/[^\\/<>\s]{1,64} [^\\/<>\s]{1,64}/')
)); ));
if($validator->isValid($_POST)) { if($validator->isValid($_POST)) {