I have the funtion:
public function validation()
{
$validation = new Validation();
$messages = $validation->validate($_POST);
if(count($messages)){
$this->validates($messages);
return false;
}
}
But i would like it to validate the fields that I try to insert only like:
$robot->name = 'Name'; $robot->lastname = 'Robot';
So that it validates the robot object and not $_POST array