Hi there,
The issue MR-ISSUE-516 was just created by John (jsimons).
Key: MR-ISSUE-516
Summary: DataBindAttribute with Validate=True and
ValidateSameAsAttribute on model makes validation fail sometimes
Type: Bug
Importance: Medium
Description:
If the object that is being validated has a ValidateSameAsAttribute,
the property that contains the attribute needs to come after the
propertyToCompare otherwise the databind fails to populate attribute.
Eg.
public class DataForm
{
//This property is defined before Email, this is not going to
work!!
[ValidateSameAs("Email")]
public string ConfirmEmail { get; set; }
[ValidateNonEmpty("Email cannot be empty.")]
public string Email { get; set; }
}
public class DataForm2
{
[ValidateNonEmpty("Email cannot be empty.")]
public string Email { get; set; }
//This property is defined after Email, this works
[ValidateSameAs("Email")]
public string ConfirmEmail { get; set; }
}
I've attached a sample.
For more, see
http://support.castleproject.org/projects/MR/issues/view/MR-ISSUE-516
--
donjon
by Castle Stronghold
http://www.castle-donjon.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
-~----------~----~----~----~------~----~------~--~---