how to insert optional validation message in model phalcon 3

I use phalcon2 this code :

ı want upgrade phalcon3 this code:

its not have error but error messages get null new record. other standart validations are work correctly How can I do it ?

I now phalcon validator also have alnum validator is only a example if . I dont want create my own validator because ı use this only one page.

Phalcon\Mvc\Model\Message is working. is it deprecated ?

edited Aug '16

You know there is alphanumeric validator in phalcon, right ? Also you should use $this->appendMessage(new Phalcon\Mvc\Model\Message)) i think.


yes ı know, but phalcon alphanumeric validator return true for latin extended characters.

$this->appendMessage(new Phalcon\Mvc\Model\Message)) is work phalcon2 and phalcon3 but Mvc\Model\Validator is deprecated

Phalcon\Mvc\Model\Message related Mvc\Model\Validator. is deprecated or support more time ?

Only Mvc\Model\Validator is deprecated as far as i know. Phalcon\Mvc\Model\Message can be still used i think.