question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

quarkus-spring-data-rest Validation constraint message is empty.

See original GitHub issue

Describe the bug Extension: quarkus-spring-data-rest Quarkus Version error: On the current master branch

On Quarkus 1.11.5.Final and 1.12.0.Final when you set up an entity with contains validation annotation as:

@Entity
public class Book {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Length(min = 2, max = 50, message = "length must be between {min} and {max}")
    @NotBlank(message = "Name may not be blank")
    private String name;

For an invalid input, you got an error message like length must be between 2 and 50 But now the message is empty.

Reproducer

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gytiscommented, Mar 9, 2021

Yes, this is a duplicate issue. I’ve only added a basic mapping to start with. I’ve discussed this with @Sgitario offline last week and will look into it.

0reactions
geoandcommented, Mar 8, 2021

I certainly looks like it, but I’ll let @gytis decide

Read more comments on GitHub >

github_iconTop Results From Across the Web

Empty messages with Validation errors in Spring Data REST
I reckon that Spring MVC doesn't know where to show the error message as the constraint violation of the class-level constraint doesn't ...
Read more >
Validation with Hibernate Validator - Quarkus
The method uses the Validator instance to check the payload. It returns a set of violations. If this set is empty, it means...
Read more >
Spring Validation Message Interpolation | Baeldung
Message interpolation is the process used for creating error messages for Java bean validation constraints. For example, we can see the messages ......
Read more >
Chapter 3. Creating custom constraints - Red Hat on GitHub
To create a custom constraint, the following three steps are required: Create a constraint annotation. Implement a validator. Define a default error message...
Read more >
Validation with Spring Boot - the Complete Guide - Reflectoring
Very basically, Bean Validation works by defining constraints to the fields ... @NotBlank : to say that a string field must not be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found