Issues
- Define a rule in Xml using a .Net Type NameNHV-110Resolved issue: NHV-110Dario Quintana
- Examples updated to Visual Studio 2010NHV-109Resolved issue: NHV-109Dario Quintana
- Validation messages in pt-BRNHV-108Resolved issue: NHV-108
- NHibernate.Validator.Exceptions.InvalidStateException has the private field static (InvalidValue[] _invalidValues)NHV-106Resolved issue: NHV-106
- add all the missing resources and a test to check itNHV-105Resolved issue: NHV-105
- message for ipaddress misses from resourceNHV-104Resolved issue: NHV-104Dario Quintana
- Validation of collection object (a specific class representing the collection)NHV-103
- Making event listeners serializable in order to be able to serialize NH's ConfigurationNHV-101Resolved issue: NHV-101
8 of 8
Useful to use rules defined in other assemblies.
The method: CreateAttributeFromClass from class: NHibernate.Validator.Cfg.MappingSchema.RuleAttributeFactory fails when I set a rule validation with FullName + Assembly:
Example:
<attributename message="Custom Message">
Custom.Validation.CustomValidators.CustomClassAttribute, Custom.Validation.CustomValidators
</attributename>
The method needs this code:
if (type == null)
{
type = System.Type.GetType(GetText(attributename), true);
}
between this:
if (type == null)
{
type = assembly.GetType(entityType.Namespace + "." + GetText(attributename));
}
if (type == null)
{
throw new InvalidAttributeNameException(GetText(attributename), entityType);
}