ptariche / koa-waterline

Deprecated: A middleware for your hose
MIT License
14 stars 11 forks source link

How to pass validation rules? #5

Closed JoshZA closed 8 years ago

JoshZA commented 8 years ago

Heya, how do we pass validations to the schema?

like these

I tried to define:

    properties: {
      name: {type: 'string', required: true, notEmpty: true},

but these validations get ignored

ptariche commented 8 years ago

Other than required, the other validation rules have not been set yet. I will add this feature.

https://github.com/sailsjs/anchor/blob/master/lib/match/rules.js

ptariche commented 8 years ago

added support for attribution types of properties. You would pass like the above example. Release Candidate