This is extended version of Phalcon\Validation\Validator\Identical with Validator Trait implemented.
namespace Foo\Forms;
use Phalcon\Forms\Element\Text;
use Vegas\Validation\Validator\Identical;
class Bar extends \Vegas\Forms\Form
{
public function initialize()
{
$terms = new Text('terms');
$terms->addValidator(new Identical([
'value' => 'yes'
]));
$this->add($terms);
// ...
}
}