Menu

#2 Implement Model "set" value sanity

open
nobody
None
7
2011-02-26
2011-02-26
No

The model should be able to either automatically lookup from the "columns" array if the value being set via "set()" is valid. Optionally, the overriding Model should be able to set its own restrictions, ie: UserModel could say column/attribute "email" needs to be validated as an "email" field, which would spawn internal regex checking to ensure it matches a valid email address.

Simplier examples would be a database definition sets a column as INT(11), so only integers < 10 ^ 11 will be accepted.

Discussion


Log in to post a comment.