Hello!
I have started using Phalcon since CodeIgniter's developers don't want to tell us what is gonna happen with their framework. So I came across with form validation which is something that's the easiest thing in previously mentioned framework. The problem which I encountred is prevalidation - I need to validate password length before I save it into database. I could do that with validation function in specific model but I already encrypt the password in controller. I also found out the filter, but that's not something which would be useful in my case.
The second thing is token checking. I added this code to view:
{{ hidden_field('id': 'register', 'name': security.getTokenKey(), 'value': security.getToken()) }}
{{ submit_button('Register') }}
And that's how I'm checking token in controller:
if ($this->request->isPost() && $this->security->checkToken()) {
...
}
Is that way right?
Thank you for help!