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

jooby-validation: skip double validation when filter is on lambda and controller #3530

Closed
jknack opened this issue Sep 15, 2024 · 0 comments
Closed

Comments

@jknack
Copy link
Member

jknack commented Sep 15, 2024

Given:

{
    use(validate());
    post("/validation-OK", ctx -> {
       // Good, it works
       var validBean = ctx.body(Bean.class);
    });

    mvc(new Controller_());
}

class Controller {
   @POST
   Bean create(@Valid Bean validBean) {
     //Bad, validation will run twice
   }
}
@jknack jknack added this to the 3.4.0 milestone Sep 15, 2024
@jknack jknack closed this as completed in 3c17973 Sep 15, 2024
jknack added a commit that referenced this issue Sep 15, 2024
… controller

- jooby-apt: set the `io.jooby.validation.BeanValidator:true` route attribute
- fix #3530
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