Smarty : parameter 'field2' is not a valid date error

This is a discussion on Smarty : parameter 'field2' is not a valid date error within the PHP General forums, part of the PHP Programming Forums category; Hello I use SmartyValidate add on/ I'm getting the error: Notice: SmartyValidate: [isDateAfter] parameter 'field2' is not a valid ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-05-2007
alernikow@gmail.com
 
Posts: n/a
Default Smarty : parameter 'field2' is not a valid date error

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 ?

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:20 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0