Skip to content

Commit bd61da1

Browse files
committed
Merge branch '6.1.x'
2 parents f6110dd + 21bc872 commit bd61da1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

framework-docs/modules/ROOT/pages/core/validation/beanvalidation.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -377,22 +377,22 @@ Kotlin::
377377

378378
A `ConstraintViolation` on `Person.name()` is adapted to a `FieldError` with the following:
379379

380-
- Error codes `"Size.student.name"`, `"Size.name"`, `"Size.java.lang.String"`, and `"Size"`
380+
- Error codes `"Size.person.name"`, `"Size.name"`, `"Size.java.lang.String"`, and `"Size"`
381381
- Message arguments `"name"`, `10`, and `1` (the field name and the constraint attributes)
382382
- Default message "size must be between 1 and 10"
383383

384384
To customize the default message, you can add properties to
385385
xref:core/beans/context-introduction.adoc#context-functionality-messagesource[MessageSource]
386386
resource bundles using any of the above errors codes and message arguments. Note also that the
387387
message argument `"name"` is itself a `MessageSourceResolvable` with error codes
388-
`"student.name"` and `"name"` and can customized too. For example:
388+
`"person.name"` and `"name"` and can customized too. For example:
389389

390390
Properties::
391391
+
392392
[source,properties,indent=0,subs="verbatim,quotes",role="secondary"]
393393
----
394-
Size.student.name=Please, provide a {0} that is between {2} and {1} characters long
395-
student.name=username
394+
Size.peron.name=Please, provide a {0} that is between {2} and {1} characters long
395+
person.name=username
396396
----
397397

398398
A `ConstraintViolation` on the `degrees` method parameter is adapted to a

0 commit comments

Comments
 (0)