You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$t1 = new \Phalcon\Validation\Validator\PresenceOf(); // default message
$t2 = new \Phalcon\Validation\Validator\PresenceOf(['message' => 'Field :field is required']); // custom message
var_dump($t1 == $t2); // FALSE – need this for detect custom message
// expected: NULL|FALSE - empty message for default text (not set)
var_dump($t1->getOption('message') == NULL);
// expected: text message - has custom message (developer set this message)
var_dump($t2->getOption('message') == 'Field :field is required');
Really cool functionality in previous version Phalcon\Validation::setDefaultMessages. Any ideas how to implement this functionality?
From: #767
Thanks!
The text was updated successfully, but these errors were encountered: