Skip to content

Add default descriptions for more Hibernate Validator constraints - #1066

Open
chuuminggg wants to merge 1 commit into
spring-projects:mainfrom
chuuminggg:add-hibernate-validator-constraint-descriptions
Open

chuuminggg wants to merge 1 commit into
spring-projects:mainfrom
chuuminggg:add-hibernate-validator-constraint-descriptions

Conversation

@chuuminggg

Copy link
Copy Markdown

Fixes gh-1065

This adds default constraint descriptions for the following Hibernate Validator constraints:

  • BitcoinAddress
  • ISBN
  • Normalized
  • UniqueElements
  • UUID

Previously, documenting a property that uses one of these constraints failed with a MissingResourceException unless a custom description was provided. The descriptions follow the style of the existing ones (for example, URL and CreditCardNumber), and the list of supported constraints in the reference documentation has been updated.

DurationMin, DurationMax, and the country-specific constraints have been left out for now, as mentioned in the issue.

While updating the reference documentation, I noticed that its list of Hibernate Validator constraints also contains SafeHtml and Hibernate Validator's Email, NotBlank, and NotEmpty, which no longer exist in Hibernate Validator 9, and that Currency is listed twice. I've left these as they are to keep this change focused, but I'm happy to clean them up here or separately if you'd like.

Add default constraint descriptions for Hibernate Validator's
BitcoinAddress, ISBN, Normalized, UniqueElements, and UUID
constraints. Previously, documenting a property annotated with one
of these constraints failed with a MissingResourceException unless
a custom description had been provided.

Fixes spring-projectsgh-1065

Signed-off-by: chuuminggg <rorrxr@naver.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide default descriptions for Hibernate Validator's BitcoinAddress, ISBN, Normalized, UniqueElements, and UUID constraints

2 participants