I am working with validation on a view with 2 forms (login/register).
I am using isset method to check which form is submitted and accordingly run the validation.
Controller function login
public function login(){
if (isset ($_POST['btnSignIn']))
{
if($this->form_validation->run() == FALSE) {
// do tasks
}
}
Controller function register
public function register(){
if (isset ($_POST['btnSignUp']))
{
if($this->form_validation->run() == FALSE) {
// do tasks
}
}
Even with these code in place, Submitting either form displays error for both the forms.
However I have config array initialized in form_validation.php with all the controls in both forms.
And removing any of these control from config array is the only way I can stop errors from displaying, but then it wont display ever.
My question is, Is there any way I can implement this to separate config array or validation for proper display of messages.
I hope my issue is clear.
Any help is appreciated.