Issues
- Define a rule in Xml using a .Net Type NameNHV-110Resolved issue: NHV-110Dario Quintana
- Impossible to create [DecimalMin()] and [DecimalMax()] attributesNHV-107Resolved issue: NHV-107
- DecodeMemberAccessExpression incorrectly assumes Convert members return "object" type.NHV-102Resolved issue: NHV-102
- Patch to build against NH3 Alpha3NHV-100Resolved issue: NHV-100
- Digits confusing behaviorNHV-97
- Nested Components - NullReferenceException when initializing validation infrastructure.NHV-91Resolved issue: NHV-91Dario Quintana
- Croatian (Hr) language resources for default validation messages and Specific validator for Croatian Personal Identification Number (OIB)NHV-86Resolved issue: NHV-86
- Public methods in ValidatorEngine is not overridableNHV-84Resolved issue: NHV-84Dario Quintana
8 of 8
Define a rule in Xml using a .Net Type Name
Fixed
Description
Environment
None
Attachments
1
Details
Details
Assignee
Dario Quintana
Dario QuintanaReporter
Julián Quiroga
Julián QuirogaComponents
Fix versions
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created January 13, 2011 at 10:51 AM
Updated March 10, 2011 at 4:03 PM
Resolved March 10, 2011 at 4:03 PM
Activity
Show:
Dario QuintanaMarch 10, 2011 at 4:03 PM
Fixed in r1661. Patch applied with minor change.
Dario QuintanaMarch 10, 2011 at 4:01 PM
Thanks Julian.
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);
}