2
I’m using the rule "alpha_numeric_spaces" to validate letters and numbers with space, but when I use some special character or letters like "ç", the validation does not pass, there is some way around this or just creating a special rule?
Ex:
$validator->set_rules('nome', 'Nome', 'min_length[3]|max_length[60]|alpha_numeric_spaces');
Thanks, but where do I put this function? I have to create one class and extend another and redeclarate the function?
– Thiago
Hello! The function that has been demonstrated does not need to put anywhere, it is already in the sources of Codeigniter, it is only for appreciation. What is needed is to rewrite the validation line of your input, removing your
alpha_numeric_spaces
and insertingregex_match[/[\p{L}0-9 ]+$/i]
.– C. Bohok