Skip to content

Response called with no verification working #15

@clementAC

Description

@clementAC

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"));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions