aijosh
Member
Hello,
I have a validation that compares two dates to ensure start date is less that end date.
If I have only one group of records repeating, the validation works ok
But when I click + to add more repeats, the validation fails for all.
I'm guessing the element values are all mixed up once there are more than one on the page.
See my php validation in case it can provide any hint: It works ok with only one record on the group
$fro = '01/' . '{#_##_6_repeat___fro_month_raw}' . '/' . '{#_##_6_repeat___fro_year_raw}';
$to = '01/' . '{#_##_6_repeat___to_month_raw}' . '/' . '{#_##_6_repeat___to_year_raw}';
return strtotime($to) > strtotime($fro);
I have a validation that compares two dates to ensure start date is less that end date.
If I have only one group of records repeating, the validation works ok
But when I click + to add more repeats, the validation fails for all.
I'm guessing the element values are all mixed up once there are more than one on the page.
See my php validation in case it can provide any hint: It works ok with only one record on the group
$fro = '01/' . '{#_##_6_repeat___fro_month_raw}' . '/' . '{#_##_6_repeat___fro_year_raw}';
$to = '01/' . '{#_##_6_repeat___to_month_raw}' . '/' . '{#_##_6_repeat___to_year_raw}';
return strtotime($to) > strtotime($fro);
Last edited: