modella/validators — pull request #5 by lvivier (2014-04-05 21:29:14+00:00)
Title: Use a constructor as a value for type

```js
var User = modella('user').attr('email', {type:String});
```

This change allows us to use a constructor function instead of a string for `type`, as a stepping stone toward modella/modella#24. It doesn't break the existing use of `type`, just adds another validator.

It won't validate a model instance yet, because clone ([lib/utils/clone:30](https://github.com/modella/modella/blob/master/lib/utils/clone.js#L30)) but I think we can opt out of cloning as for BSON ObjectIDs?