tmpfs / async-validate

Asynchronous type validation for node and the browser
Other
314 stars 45 forks source link

Code example for Rule function seems to be incorrect #20

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi,

May I checked if schema.error is correct? It appears to be undefined and when I checked lib/schema.js I see schema.ValidationError exposed but not schema.error

var schema = require('async-validate');
var ValidationError = schema.error;
var descriptor = {
.....
tmpfs commented 8 years ago

My bad this changed in 0.2.x I'll check the readme again, thanks.

ghost commented 8 years ago

I can do a PR for it if you want

tmpfs commented 8 years ago

PR welcome, thanks.