diff --git a/spring-framework-reference/src/validation.xml b/spring-framework-reference/src/validation.xml index bf0931ff76d..fb96f02349f 100644 --- a/spring-framework-reference/src/validation.xml +++ b/spring-framework-reference/src/validation.xml @@ -978,8 +978,8 @@ public class Money {
Custom Format Annotations - The presence of field or method annotations on properties of your model objects can also trigger field-specific formatting logic. - Bind a custom annotation to a Formatter instance by implementing an AnnotationFormatterFactory: + Field-specific formatting can be triggered by annotating model properties. + To bind a custom annotation to a Formatter instance, implement a AnnotationFormatterFactory: { The example implementation below binds a custom @DecimalFormat annotation to a Number Formatter instance. - This annotation allows the format pattern to be configured as its value. + This particular annotation allows the format pattern to be configured. - Then, to trigger somewhere in your model: + Then, to trigger this custom Number formatting, simply annotate a property as a @DecimalFormat in your model: