Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#feature: included validate() fields option #113

Open
wants to merge 1 commit into
base: mapped-types-v4
Choose a base branch
from

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
*/
validate(options?: { skip?: string[] }): Promise<void>;
validate(options?: { skip?: string[], fields?: string[] }): Promise<ValidationError>;
Copy link
Collaborator

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.

None yet

2 participants