|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
alernikow Smarty n00b
Joined: 04 Jul 2007 Posts: 2
|
Posted: Wed Jul 04, 2007 10:07 pm Post subject: parameter 'field2' is not a valid date |
|
|
Hello
I use SmartyValidate add on/
I'm getting the error:
Notice: SmartyValidate: [isDateAfter] parameter 'field2' is not a valid date. in C:\wamp\
Code:
{html_select_date prefix="startDate"}
{html_select_date prefix="endDate"}
{validate id="endDate" field="endDate" criteria="dummyValid" transform="makeDate"}
{validate id="check" field="endDate" criteria="isDateOnOrAfter" field2="startDate" transform="makeDate"}
input type="hidden" name="startDate'
input type="hidden" name="endDate"
php:
if(empty($_POST)) {
SmartyValidate::connect($smarty, true);
SmartyValidate::register_validator('endDate', 'EndDate', 'dummyValid', false, false, 'makeDate');
SmartyValidate::register_validator('check', 'endDate', 'dummyValid', false, false, 'makeDate');
} else {
SmartyValidate::connect($smarty);
if(SmartyValidate::is_valid($_POST)) {
SmartyValidate::disconnect();
$smarty->display('success.tpl');
} else {
$smarty->assign($_POST);
}
}
Please help me. I'm new in Smarty
Does "transform="makeDate"" attribut is not responsilbe to convert 'field2' in to date ? |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|