08-13-2016, 09:17 AM
So it seems in 3.1 there was a change to the form validation library that re-orders the rules putting callbacks to be run first.
I am not sure what the reasoning behind this was but it appears to be fairly annoying. Could just comment out the re-ordering but there must have been a reason this was done.
Perhaps someone from the CI team could tell us why this was. I am going to head over to github to see if I can find a reason behind it, although to me it seems the rules should be applied in the order I put them.
Best wishes,
Paul.
Quote:Prepare rules
*
* Re-orders the provided rules in order of importance, so that
* they can easily be executed later without weird checks ...
*
* "Callbacks" are given the highest priority (always called),
* followed by 'required' (called if callbacks didn't fail),
* and then every next rule depends on the previous one passing.
*
* @param array $rules
* @return array
I am not sure what the reasoning behind this was but it appears to be fairly annoying. Could just comment out the re-ordering but there must have been a reason this was done.
Perhaps someone from the CI team could tell us why this was. I am going to head over to github to see if I can find a reason behind it, although to me it seems the rules should be applied in the order I put them.
Best wishes,
Paul.