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

array $options for Phalcon\Mvc\Model\Validator\

Hi all. Anybody know, where I can see full example for $options which used in Phalcon\Mvc\Model\Validator... For example

new Email([
        'field' => 'primaryEmail',
        'required' => true,
    ])

I see that $options has keys 'field', 'required'.

But I don't know another keys, anybody know ?



33.8k

Why use required? Instead create a PresenceOf (I think). The other key I only know for that validator is message (the same for all the others).

Yes, I know about PresenceOf. But in my example I showed keys which I know. It is not code - it is only example with keys of option array.

Thank You. But still, where I can read full description about this option array ?



33.8k

This has to be answered by @phalcon, because I also don't know where can it be (I searched few weeks ago for the same when doing the validators).

Thank You, RompePC.