>I need to perform validation for a field in an entity (DBFieldMinutes) but I need to have the error message associated with a different field on the ASP form (ASPFieldDateTime). I do not want a record saved if the rule is broken. Is there a way to do this? (please note, I am a novice using mere mortals).
>
>
>MereMortals version 3.5
If the other field on the ASP form is bound to a data object and I understand the question, when you run the validation in your Rules business object, when you add the broken rule, specify the column with which you want the error associated. It would look something like this:
if (DBFieldMinutes == someValue)
{
Msg = "Rule was broken.";
AddErrorProviderBrokenRule(DBFieldDateTime, Msg);
}
If the field on the ASP form is not data bound, you will probably have to use the validation for the control bound to DBFieldMinutes and show a message box.
Linda Harmes
HiBit Technologies, Inc.