if(!eregi("^([0-9a-z_\[\]\*\- ])+$", $subuser))
$form->setError($field, "* Username not alphanumeric");
Can anybody tell me why it is not allowing characters such as -
and *
?
if(!eregi("^([0-9a-z])+$", $subuser))
$form->setError($field, "* Username not alphanumeric");
That is the original piece of code. A friend changed it to the top piece and it will allow a-z and 0-9 but it wont allow the other characters I need it to. Can anyone help me?
Thanks in advance.