News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Felix Geisendorfer's Blog:
Validating the cleaned output of HtmlHelperdateTimeOptionTag()
October 17, 2006 @ 08:18:00

Felix Geisendorfer keeps it short and sweet in this latest post. He shares a regular expression to validate the output of the HtmlHelper method dateTimeOptionTag.

Ok, let's make this short and painless. I just needed to validate the (cleaned) output of an HtmlHelper::dateTimeOptionTag() to be a correct datetime value matching this format.

The regular expression is fairly simple (long, but simple) and he shows a simple way to include it into a model (in the special $validate array) to check the contents of the 'start' field).

0 comments voice your opinion now!
cakephp framework model regular expression validate datetime cakephp framework model regular expression validate datetime


blog comments powered by Disqus

Similar Posts

Andrew Perkin's Site: Cakephp Video Tutorials (Authentication)

Debuggable Blog: How to paginate a CakePHP search over a HABTM relation without hacking the core

NetTuts.com: Build Web Apps From Scratch With Laravel: Filters, Validations, and Files

Nik Chankov's Blog: 10 reasons to choose CakePHP as Framework

Alexander Netkachev's Blog: A little bit more about Zend_Controller plugins


Community Events





Don't see your event here?
Let us know!


application opinion voicesoftheelephpant composer package series laravel podcast tool community release symfony introduction version framework update library security language interview

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework