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

howto do pair wise validations in Phalcon

I want to do pairwise validations in the model!! i.e i want to have unique pair of $user,$phoneno,$age. how to Uniqueness validator to the pairs? Plese help!!



93.7k
Accepted
answer
edited Oct '16

Perhaps those links can help:

https://forum.phalcon.io/discussion/3641/uniqueness-with-combination-of-a-set-of-fields

https://docs.phalcon.io/en/latest/api/Phalcon_Validation_Validator_Uniqueness.html

Just add uniqueness validatior for each pair ?