kohana / orm

Kohana ORM
159 stars 108 forks source link

First filter(), second rules() #111

Open ghost opened 9 years ago

ghost commented 9 years ago

By this (title of issue), password of user first hashes (By filter of Model_User (Auth::instance()->hash()), and after them it checks for some rules from rules() method. And, so, min_length, for example, doesn't works.

dejwid commented 9 years ago

Rules should be checked just before inserting data to database, because: For example: What if string will be longer then your database column expect? - Error. So, I think that you have check password length before putting into model. You should validate password in controller. Summary: Everythink works good but just not like author expected. This issue should be marked as closed.

ghost commented 9 years ago

@dejwid, Did you read my question? So, test them and see. That a bug of rules()/filters(), which should be fixed.

Also, you can search this trouble in internet, i am not only in catching this issue.