How can i edit this to also accept æøåÆØÅ?
function validate_username($input, $pattern = '/[^A-Za-z0-9]/')
{
return !preg_match($pattern, $input);
}
How can i edit this to also accept æøåÆØÅ?
function validate_username($input, $pattern = '/[^A-Za-z0-9]/')
{
return !preg_match($pattern, $input);
}
'/[^A-Za-z0-9æøåÆØÅ]/u'
Requires that your php file is saved in UTF-8 and also that the input is UTF-8 as well of course.