Welcome Guest, Not a member yet? Register   Sign In
Validation - Custom callback not behaving as expected?
#7

[eluser]ardinotow[/eluser]
I have new solution. Instead of declare default value with javascript like I mentioned before, hacking the Validation library is seems to be work.

Open Validation.php where located in system/libraries/Validation.php. In function run() find this line:

Code:
if ( ! isset($_POST[$field]) OR $_POST[$field] == '')
    {
       continue;
    }

Delete 'continue;' or just give double slash on it, here is that line should like:

Code:
if ( ! isset($_POST[$field]) OR $_POST[$field] == '')
    {
       //continue;
    }
Now, whether the field that need custom validation is empty or not your callback function should be executed.
If you think this solution has potential problem or side effect please let me know....


Messages In This Thread
Validation - Custom callback not behaving as expected? - by El Forum - 02-04-2008, 07:43 PM
Validation - Custom callback not behaving as expected? - by El Forum - 02-04-2008, 08:33 PM
Validation - Custom callback not behaving as expected? - by El Forum - 02-04-2008, 08:44 PM
Validation - Custom callback not behaving as expected? - by El Forum - 02-24-2008, 12:21 PM
Validation - Custom callback not behaving as expected? - by El Forum - 04-01-2008, 09:08 AM
Validation - Custom callback not behaving as expected? - by El Forum - 04-01-2008, 09:33 AM
Validation - Custom callback not behaving as expected? - by El Forum - 04-01-2008, 08:01 PM
Validation - Custom callback not behaving as expected? - by El Forum - 03-21-2010, 07:42 PM
Validation - Custom callback not behaving as expected? - by El Forum - 03-22-2010, 04:58 PM
Validation - Custom callback not behaving as expected? - by El Forum - 03-22-2010, 06:09 PM
Validation - Custom callback not behaving as expected? - by El Forum - 03-22-2010, 11:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB