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

Response called with no verification working #15

Open
clementAC opened this issue Aug 1, 2017 · 0 comments
Open

Response called with no verification working #15

clementAC opened this issue Aug 1, 2017 · 0 comments

Comments

@clementAC
Copy link

Hi

This restify plugin seems great and well documented, I'm trying to use it in my project but with lack of efficacity =/ .
I followed your instructions from initialization to usage but does not seem to work.

server.get( {
     url: "/user/:userId",
     validation: {
         url: {
             userId: {
                 type: "number",
                 required: true,
                 min: 0,
             },
         },
     },
}, response( req, res, next ));

Here is the usage done in a simple route with parameters in the URL but when I try to access it without userId the response part is called without any verification.

Concerning the error personalization restify changed their error api and split it into a separate package restify-errors:
const validator = new RequestValidator(restify.BadRequestError);
into
const validator = new RequestValidator(new restify-errors.BadRequestError("personalized message"));

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

No branches or pull requests

1 participant