I was looking at *COMP-ISSUE-37* on donjon today about internationalizing
user provided error messags and was thinking of the following:

How about if a MessageKey property was provided on each validation
attribute?  If this was set then the value would be transferred to the
MessageKey property on the Validator, overriding the default value.

Taking this approach would allow the existing AbstractValidator
functionality to continue as it does at present.

In the event of a conflict between the MessageKey property and the
ErrorMessage property the ErrorMessageProperty could still take preference -
in effect maintaining the existing behavior.  If only the MessageKey
property has been set then the error message value would be looked up from
resources as usual, however since the MessageKey is developer provided the
developer can also provide their own custom resources with their custom
messages there.

Thoughts?

Symon Rottem
http://blog.symbiotic-development.com

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-devel?hl=en.

Reply via email to