flatiron/resourceful — Issue #54: Prefix properties
Author: indexzero
Created: 2012-02-11 01:21:40+00:00
State: open

``` js
this.string('_id').unique(true).prefix('user/');
```

Would compile down to:

``` js
this.string('_id').unique(true).sanitize(function (val) {
return !new RegExp('^user/(.*)).test(val)
? 'user/' + val
: val;
});
```