Vegas CMF Validation

Vegas\Validation\Validator\Regex

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

Example

namespace Foo\Forms;

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

class Bar extends \Vegas\Forms\Form
{
    public function initialize()
    {
        $foobar = new Text('foobar');
        $foobar->addValidator(new Regex(['pattern' => '/[abfor]{6}/']));
        $this->add($foobar);

        // ...
    }
}