We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Form validation for used elements

How can I validate used element of form? e.g. I have email, password in form and both have validation and in view I am using only email, after post validation happened for both.



2.1k
Accepted
answer
edited Feb '15

i bvelieve its

public function beforeValidation()
{
    // validation here with checks if field is empty
}

Can we used this function in form



2.1k

all classes has events, and all events are standardized