Vegas CMF Validation

Vegas\Validation\Validator\StringLength

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

Example

namespace Foo\Forms;

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

class Bar extends \Vegas\Forms\Form
{
    public function initialize()
    {
        $username = new Text('username');
        $username->addValidator(new StringLength([
            'min' => 6,
            'max' => 60
        ]));
        $this->add($username);

        // ...
    }
}