Add default descriptions for Hibernate Validator's constraints

Closes gh-151
This commit is contained in:
Andy Wilkinson
2016-04-13 12:00:56 +01:00
parent e5aa5ba728
commit ecdc1971c2
3 changed files with 233 additions and 59 deletions

View File

@@ -534,6 +534,21 @@ Default descriptions are provided for all of the Bean Validation 1.1's constrain
* Pattern
* Size
Default descriptions are also provided for constraints from Hibernate Validator:
* CreditCardNumber
* EAN
* Email
* Length
* LuhnCheck
* Mod10Check
* Mod11Check
* NotBlank
* NotEmpty
* Range
* SafeHtml
* URL
To override the default descriptions, or to provide a new description, create a resource
bundle with the base name
`org.springframework.restdocs.constraints.ConstraintDescriptions`. The Spring