I'm trying to make my partial class to play nicely with verification engine(see code below).
I'm trying to create new property (PasswordEx) which works.
I need to add verifier to this property. Adding it using attribute. It works. Kind of..
When whole entity validated - it works and I get this field warning, etc.
What I want is INotifyDataErrorInfo to work for this property so user see wrong entry right away...
My guess is that I need to tell VerifierEngine to run verification on this property inside my setter but can't come up with syntax to do that. Or maybe I can do it some other way?
Also, how would I raise INotifyPropertyChanged event from my partial class? Is there any built-in gluing in DevForce?
[MetadataType(typeof(MEMUserMetadata))]
public partial class User
{
private string passwordEx;
[StringLengthVerifier(MaxValue = 20, MinValue = 6, IsRequired = true, ErrorMessage = "Password Required")]
public string PasswordEx
{
get
{
return this.passwordEx;
}
set
{
this.passwordEx = value;
}
}
public string PasswordAgainEx { get; set; }
}