CodeIgniter Forums
priority of validation - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forum-11.html)
+--- Thread: priority of validation (/thread-67920.html)



priority of validation - yuki - 04-24-2017

I studying "Form Validation" while surfing the net.
It's written by much Website as follows.

Code:
$this->form_validation->set_rules("email", "E-MAIL", "required|trim|callback_validate_credentials");

More than one rule and callback are included by this example.

validate_credentials() is check whether the character string to which that was handed exists in the data base.

But even if a blank is sent, an required error message isn't output, and an error of callback is output.
I'd like to check the required confirmation first.
How should the order of priority be specified?


RE: priority of validation - Martin7483 - 04-24-2017

Check this out.

https://forum.codeigniter.com/thread-67816-post-342612.html#pid342612


RE: priority of validation - yuki - 04-24-2017

I resolved this question.
Thank you.


RE: priority of validation - Martin7483 - 04-25-2017

What did you use a a solution?


RE: priority of validation - yuki - 04-25-2017

I chose the solution to override "_prepare_rules".