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

allow passing list of fields for validation to save #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

neonstalwart
Copy link

when calling save, it could be helpful to be able to pass the list of fields to pass to validate. for example, a schema might define an id property that's required but when creating a new object the id is assigned by the server. in that case, being able to validate all the other fields (rather than completely skipping validation with options.skipValidation) would be useful.

store.create(data).save({ validateFields: [ 'foo', 'bar' ] });

the PR will be trivial - i'll try to get to it soon.

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.

1 participant