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

Add js-data-schema integration #10

Closed
jmdobry opened this issue Sep 30, 2014 · 0 comments
Closed

Add js-data-schema integration #10

jmdobry opened this issue Sep 30, 2014 · 0 comments
Assignees

Comments

@jmdobry
Copy link
Member

jmdobry commented Sep 30, 2014

If js-data-schema is loaded the default validate lifecycle hook will change from a noop to a function that validates an item against a resource's schema if the developer defines one. Example:

var User = store.defineResource({
  name: 'user',
  schema: {
    name: {
      type: 'string',
      nullable: false
    },
    id: {
      type: 'string',
      nullable: true
    }
  }
});
@jmdobry jmdobry self-assigned this Sep 30, 2014
@jmdobry jmdobry added done and removed in progress labels Oct 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant