|
From: Ben A. <ben...@ac...> - 2004-10-04 23:38:55
|
Dmitriy Kopylenko wrote:
> Ben,
>
> you don't need to do anything special here. Simply provide a custom
> message in "messages.properties" found in the classpath for a
> "typeMismatch.{property_name} key and Spring will take care of the
> rest i.e.
>
> typeMismatch.luhn=A valid Luhn is required
>
>
Hi Dmitriy
Thanks for the info - that's a lot nicer.
For the benefit of the archives, this is covered in the JavaDocs of
org.springframework.validation.DefaultMessageCodesResolver.
Cheers
Ben
|