frustrated
|
| Posted: 10/13/2005, 9:33 AM |
|
I need to validate that an end date(control name end_d) is before the start date(control name start_d) of two date fields being entered by the user. I have been playing with OnValidate>Regular Expression Validation. I dont know much about coding but I thought that if I add the control of the end date and type end_d>=start_d it would work. Alas, it just gives me my error message regardless of what dates I put in. There was a post just like mine months ago, they were nice enough to share that they had figured it out, but didn't include their solution. BUMMER!
Here is what my code looks like:
global $performer;
if (strlen($performer->end_d->GetValue()) && !preg_match("/end_d>start_d/", $performer->end_d->GetText()))
{
$performer->end_d->Errors->addError("test");
}
|