According to NHibernate Validator documentation:
http://nhforge.org/wikis/validator/nhibernate-validator-1-0-0-documentation.aspx
I need to pass the resource manager so that I can use this for validation error messages. Cm:
Alternatively, you can provide a ResourceManager by checking programmatically validation rules ...
and
If the NHibernate Validator cannot resolve the key from the ResourceManager or from the ValidatorMessage, it will revert to the built-in default values.
It even shows an example of how this is done in the attribute of the entity property:
[Length(Max = 5, Message = "{long}")]
[Pattern(Regex = "[0-9]+")]
[NotNull]
public string Zip
{
get { return zip; }
set { zip = value; }
}
However, as far as I can see, it does not indicate how you pass the resource manager to the validation structure - does anyone know how to do this?
Thanks!