weflex / neaty

Future Node.js Framework for Serving API based on Loopback.js
https://neatyframework.org
Other
5 stars 1 forks source link

validate doesn't work with validatesInclusionOf #2

Closed yorkie closed 8 years ago

yorkie commented 8 years ago

Got this error:

{ [ValidationError: The `User` instance is not valid. Details: `sex` is not included in the list (value: "female").]
    name: 'ValidationError',
    message: 'The `User` instance is not valid. Details: `sex` is not included in the list (value: "female").',
    statusCode: 422,
    details: { context: 'User', codes: [Object], messages: [Object] } }

It seems that neaty only put the first element of list into validation call.

yorkie commented 8 years ago

Closing this one because famale is not female :-(

yorkie commented 8 years ago

Fixed this at https://github.com/weflex/pancake/commit/cc1888d91cda792323c2761078f29910657fa535