We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Validate field not $_POST

I have the funtion:

public function validation()

    $validation = new Validation();
    $messages = $validation->validate($_POST);
        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

Hi @GunslerRage it's very simple look the first example in model validation docs

Good luck