Skip to content

allow passing list of fields for validation to save#1

Open
neonstalwart wants to merge 1 commit into
dojo:masterfrom
neonstalwart:save-validate-fields
Open

allow passing list of fields for validation to save#1
neonstalwart wants to merge 1 commit into
dojo:masterfrom
neonstalwart:save-validate-fields

Conversation

@neonstalwart

Copy link
Copy Markdown

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