I am trying to fetch the field name, that im currently validating. But the virable is a protected function, how can i print it out? I tried to change public $_field inside my custom validation class, that extends the validation class. But it dosent work...
How can I print it out?
$validation = new \Validation\Validate();
$messages = $validation->validate($_POST);
if (count($messages)) {
foreach ($messages as $message) {
echo $message->_field;
}
}