Add model validation
Validation can now be specified directly into the models by setting a
static property "rules".