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

Validation option to enpoint config #15

Merged
merged 1 commit into from
Sep 29, 2015
Merged

Validation option to enpoint config #15

merged 1 commit into from
Sep 29, 2015

Conversation

lexich
Copy link
Owner

@lexich lexich commented Sep 29, 2015

Validate responce

{
  test: {
    url: "/api/test",
    validation: (data, cb) {
      // check data format
      let error;
      if (data instanceOf Array) {
        error = "Data must be array";
      }
      cb(error);
    }
  }
}

lexich added a commit that referenced this pull request Sep 29, 2015
Validation option to enpoint config
@lexich lexich merged commit 28ba97c into master Sep 29, 2015
@lexich lexich deleted the validation branch September 29, 2015 14:10
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

1 participant