$this->validate(new \Phalcon\Validation\Validator\Regex( array( 'field' => 'mobile', 'pattern' => '/^(13[0-9]|14[0-9]|15[0-9]|18[0-9])\d{8}$/' ) ));
wrong of parameters?
Oh namespace has changed to Phalcon\Mvc\Model\Validator\Regex
There are two validation components:
ORM: https://docs.phalcon.io/en/latest/reference/models.html#validating-data-integrity Validation: https://docs.phalcon.io/en/latest/reference/validation.html