bekos/php-validation — pull request #3 by lapiandroid (2014-07-25 08:37:55+00:00)
Title: Callback function 

Hi, i use this code
$validator
->required('You must supply telephone.')
->callback(function($val) {
return (preg_match('/^[0-9]{1,}$/', $val, $matches) === FALSE) ? false : true;
}, "Must be a Number")
->validate('telephone', 'Telephone');

To validate telephone number, but if field is invalid return this resulset:
[validData:protected] => Array
(
[telephone] => SAsa
)
as valid data. Can you help me? Thanks!