Skip to content

Conversation

bananabr
Copy link

@bananabr bananabr commented Jul 11, 2017

included validate() fields option according to docs.sequelizejs.com/class/lib/model.js~Model.html#instance-method-validate
* @param options Options that are passed to the validator
*/
validate(options?: { skip?: string[] }): Promise<void>;
validate(options?: { skip?: string[], fields?: string[] }): Promise<ValidationError>;
Copy link
Collaborator

@felixfbecker felixfbecker Jul 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return type is wrong. It was correct before.

The promise fulfills if and only if validation successful; otherwise it rejects an Error instance containing { field name : [error msgs] } entries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants