custom transaction and date validation
Posted: 2015-09-11 16:49
[hope there is still someone using MX Kollection or Addt...!]
Hi all,
I have problems trying how to figure how to check for inserted value in a custom transaction.
In this transaction I have a date field.
The entered date have to conform to this restrictions:
- the entered date must be 7 days before the current date;
- the entered date must be less than 15 november 2015.
I created this variable in php:
then I changed this validation rule:
to
This works as I expected but now how can add the other check (the entered date should be less than 15 november 2015)?
Thanks in advance for any help.
tony
Hi all,
I have problems trying how to figure how to check for inserted value in a custom transaction.
In this transaction I have a date field.
The entered date have to conform to this restrictions:
- the entered date must be 7 days before the current date;
- the entered date must be less than 15 november 2015.
I created this variable in php:
Code: Select all
$mydate = KT_formatDate(date("Y-m-d", time() - 60*60*24*8));
Code: Select all
$formValidation->addField("date_entered", true, "date", "date", "", "", "myerror");
Code: Select all
$formValidation->addField("date_entered", true, "date", "date", "", $mydate, "myerror");
Thanks in advance for any help.
tony