Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Tips and Tutorials
Validation valid_date example
Just to save someone else some time.
If you want to use valid_date in a model. The format of the date format must not be quoted.
$val->add_field('publish_start_date', 'Start Date', 'valid_date[m/d/Y g:i A]');
I mistakenly kept trying like:
$val->add_field('publish_start_date', 'Start Date', 'valid_date["m/d/Y g:i A"]');
and could not for the life of me figure out why I kept getting errors!
The error it was giving me was:
format separator does not match
Correct, the regex behind it splits on the square brackets, making the double quotes part of the match string.
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion