Welcome Guest, Not a member yet? Register   Sign In
Form validation regex_match
#1

[eluser]Perkin5[/eluser]
I want a form field to match this regex:

[a-zA-Z]\s

which I believe should match any alphabetical character or whitespace character and I am using it as follows:

Code:
$this->form_validation->set_rules('name','Name','required|regex_match[[a-zA-Z]|\s]|xss_clean');

but it does not work correctly. With a purely alphabetical string in the input field I get the error message: The Name field is not in the correct format.

What am I doing wrong?


Messages In This Thread
Form validation regex_match - by El Forum - 06-29-2012, 10:08 AM
Form validation regex_match - by El Forum - 06-29-2012, 10:20 AM
Form validation regex_match - by El Forum - 06-29-2012, 10:34 AM
Form validation regex_match - by El Forum - 06-29-2012, 10:36 AM
Form validation regex_match - by El Forum - 06-29-2012, 10:43 AM
Form validation regex_match - by El Forum - 06-29-2012, 10:46 AM
Form validation regex_match - by El Forum - 06-29-2012, 10:46 AM
Form validation regex_match - by El Forum - 06-29-2012, 10:48 AM
Form validation regex_match - by El Forum - 06-29-2012, 03:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB