If what you need is only change the message you don't need the
interpolator <property
name="Past">
<past message="your own message"/>
</property>

If you can use the NHV trunk...
http://nhforge.org/blogs/nhibernate/archive/2009/02/18/nhibernate-validator-fluent-interface-configuration.aspx

http://fabiomaulo.blogspot.com/2009/02/diving-in-nhibernatevalidator.html

2009/3/2 Marc Climent <m.clim...@adapting.com>

>
> Hi,
>
> I've been using NHV and I need to change the "default" messages.
>
> I can't change the ValidatorEngine.Interpolator at runtime (I could
> create a DefaultMessageInterpolator and initialize it with a different
> bundle and pass it, but I can't and I think I shouldn't) and I can't
> configure the resource bundle via XML, or at least I couldn't find how
> to do it.
>
> Maybe I'm missing something but it seems that the custom resource
> functionality is there but I can't use it right now.
>
> As well, i found this in ClassValidator:
>        messageBundle = factory.ResourceManager ?? GetDefaultResourceManager
> ();
>        defaultMessageBundle = GetDefaultResourceManager();
>
> But digging into the factory, is created internally by the
> ValidatorEngine specifying a null ResourceManager.
>
> So the question is... do I have to create my own resource bundles
> overriding the original ones or is there a better way to customize the
> messages?
> >
>


-- 
Fabio Maulo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to nhusers@googlegroups.com
To unsubscribe from this group, send email to 
nhusers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to