Welcome Guest, Not a member yet? Register   Sign In
regex_match and accented characters
#2

You need to add u for unicode.
Code:
/^[\w\-\.@]{1,30}$/u

Personally I use these two:

Code:
$config['error_alpha_numeric_spaces_dash'] = '/^[\w\s-_]+/u';
$config['error_alpha_numeric_spaces_dash_colon'] = '/^[\w\s:-_]+/u';


And use min_length[1] and max_length[30] instead of limiting the regular expression. So that I can re use it later.
Reply


Messages In This Thread
regex_match and accented characters - by titi1006 - 07-07-2018, 09:35 AM
RE: regex_match and accented characters - by jreklund - 07-07-2018, 03:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB