Welcome Guest, Not a member yet? Register   Sign In
How do I add a custom rule for form validation?
#1

[eluser]dallen33[/eluser]
I'm building a registration form, and when the form submits, I want it to check to see if the username exists. Right now, I'm doing it with a AJAX call that returns "username exists" or "username okay" while the user is typing. But I also want to check it while I'm validating.

Code:
$this->form_validation->set_rules('username', 'Username', 'required');

So I have 'required', but how could I also add something like 'username_check'? How would I go about this? I read the user guide but I can't seem to figure it out.


Messages In This Thread
How do I add a custom rule for form validation? - by El Forum - 07-13-2010, 01:44 PM
How do I add a custom rule for form validation? - by El Forum - 07-13-2010, 01:46 PM
How do I add a custom rule for form validation? - by El Forum - 07-13-2010, 04:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB