Package org.springframework.validation
Interface MessageCodeFormatter
- All Known Implementing Classes:
DefaultMessageCodesResolver.Format
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A strategy interface for formatting message codes.
- Since:
- 3.2
- Author:
- Chris Beams
- See Also:
-
Method Summary
-
Method Details
-
format
Build and return a message code consisting of the given fields, usually delimited byDefaultMessageCodesResolver.CODE_SEPARATOR
.- Parameters:
errorCode
- for example: "typeMismatch"objectName
- for example: "user"field
- for example, "age"- Returns:
- concatenated message code, for example: "typeMismatch.user.age"
- See Also:
-