Mvc\Collection::validationHasFailed

public validationHasFailed ()

Check whether validation process has generated any messages

use Phalcon\Mvc\Model\Validator\ExclusionIn as ExclusionIn;

class Subscriptors extends \Phalcon\Mvc\Collection
{

public function validation()
{
    this->validate(new ExclusionIn(array(
            'field' => 'status',
            'domain' => array('A', 'I')
    )));
    if (this->validationHasFailed() == true) {
            return false;
    }
}

}
doc_Phalcon
2016-10-16 09:52:17
Comments
Leave a Comment

Please login to continue.