1
Vote

Crisscrossing of errors messages for WinForm fields, when using NotifyAndValidate(), with RuleSets.

description

Here is an example of my property:
 
    [RequiredStringRule(RuleSet = "ReportFI",
        ErrorMessage = "Interview Location Address is a required field.")]
    [RequiredStringRule(RuleSet = "SuspectResidence",
        ErrorMessage = "Suspect's Residence Address is a required field.")]
    public string DisplayText {
        get {
            return _display_text;
        }
        set {
            if (_display_text != value) {
                _display_text = value;
                base.NotifyAndValidate("DisplayText ");
            }
        }
    }
 
On my application, I have a WinForm field for ReportFI address, and one for SuspectResidence address, which are both bound to separate instances of the class that contains the property shown above. One instance is created using the "ReportFI" ruleSet, and the other using the "SuspectResidence" ruleSet, via the NotifyValidatableBase class.
 
The error messages that appear next to each respective GUI field, by means of two separate error providers, is...
 
Interview Location Address is a required field.
Suspect's Residence Address is a required field.
 
Is this an issue with the way .Net reports errors via the errorProviders, or the way that ValidationFramework reports the error to the errorProvider?

comments