diff --git a/spring-framework-reference/src/validation.xml b/spring-framework-reference/src/validation.xml
index 4249657b942..bf0931ff76d 100644
--- a/spring-framework-reference/src/validation.xml
+++ b/spring-framework-reference/src/validation.xml
@@ -889,7 +889,7 @@ public class MyService {
@@ -973,7 +979,7 @@ 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.
- The binding between a custom annotation and a specific Formatter instance is made by implementing a custom AnnotationFormatterFactory:
+ Bind a custom annotation to a Formatter instance by implementing an AnnotationFormatterFactory:
{
The example implementation below binds a custom @DecimalFormat annotation to a Number Formatter instance.
- The annotation allows the format pattern to be configured as its value.
+ This annotation allows the format pattern to be configured as its value.
FormatterRegistry SPI
- Formatters are often registered in a FormatterRegistry.
+ Formatters are typically registered in a FormatterRegistry.
A DataBinder uses this registry to resolve the Formatter to use for a specific field.
This allows you to configure default Formatting rules centrally, rather than duplicating such configuration across your UI Controllers.
For example, you might want to enforce that all Date fields are formatted a certain way, or fields with a specific annotation are formatted in a certain way.
- With a shared FormatterRegistry, you define these rules once and they are applied whenever field formatting is needed.
+ With a shared FormatterRegistry, you define these rules once and they are applied whenever formatting is needed.
Review the FormatterRegistry SPI below:
@@ -1038,7 +1044,7 @@ public interface FormatterRegistry {
As shown above, Formatters may be registered by field type or annotation.
GenericFormatterRegistry is the implementation suitable for use in most UI binding environments.
- This implementation may be configured programatically or declatively as a Spring bean.
+ This implementation may be configured programatically or declaratively as a Spring bean.
- To apply a Formatter to a single field, create an @InitBinder callback on your @Controller, then call binder.registerFormatter(String, Formatter>):
+ To apply a Formatter to a single field, create an @InitBinder callback on your @Controller, then call binder.registerFormatter(String, Formatter):