ianren
08-30-2007, 07:12 AM
Not sure if this is the right place for the post. But its WinForms related for me :).
I am using the Validation framework with a WinForms GUI. There is a DateTimePicker control on the form and I want to validate that the date time on my domain object is greater than the min date of the DateTimePicker control. The conditional validator I have below doesn't seem to work.
<v:condition test="ExpiryDate > System.Windows.Forms.DateTimePicker.MinValue">
<v:message id="errorExpiryDateRequired" providers="expiryDate, validationSummary"/>
</v:condition>
Its not picking up System.Windows.Forms.DateTimePicker as a fully qualified name, instead its thinking that is part of the validation context.
Have also tried using T(System.Windows.Forms.DateTimePicker.MinValue, System.Windows.Forms).MinValue but it has the same problem.
As a work around I am writing a custom validator to check for this, but it seems a bit overkill.
What is the correct way to specify a non mscorlib.dll class in a conditional validator test?
I am using the Validation framework with a WinForms GUI. There is a DateTimePicker control on the form and I want to validate that the date time on my domain object is greater than the min date of the DateTimePicker control. The conditional validator I have below doesn't seem to work.
<v:condition test="ExpiryDate > System.Windows.Forms.DateTimePicker.MinValue">
<v:message id="errorExpiryDateRequired" providers="expiryDate, validationSummary"/>
</v:condition>
Its not picking up System.Windows.Forms.DateTimePicker as a fully qualified name, instead its thinking that is part of the validation context.
Have also tried using T(System.Windows.Forms.DateTimePicker.MinValue, System.Windows.Forms).MinValue but it has the same problem.
As a work around I am writing a custom validator to check for this, but it seems a bit overkill.
What is the correct way to specify a non mscorlib.dll class in a conditional validator test?