CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Validate One Date Against the Other

Print topic Send  topic

Author Message
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");  
    }

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.