Vegas CMF Validation

Vegas\Validation\Validator\PresenceOf

This is extended version of Phalcon\Validation\Validator\PresenceOf with Validator Trait implemented.

Example

namespace Foo\Forms;

use Phalcon\Forms\Element\Text;
use Vegas\Validation\Validator\PresenceOf;

class Bar extends \Vegas\Forms\Form
{
    public function initialize()
    {
        $username = new Text('username');
        $username->addValidator(new PresenceOf());
        $this->add($username);

        // ...
    }
}