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

Validation component; conditional validation.

Hello,

Let's imagine that we have to add some validation rule only if previous validation rule returned false or maybe even more complex validation structures (with unlimited validation logic). How can it be implemented? I suppose that best way is to create own Validation class and use Phalcon's Validator classes?

Thank you!

So effectively you want chained validation and some kind of onError -> Fail ?