Hi dkdelosreyes,
You can – you would just need to convert the values from their string representation to a Datetime or timestamp. For each field the $value variable contains the current field’s value, but you can access the other submitted fields using the $inputs array. Each array element is an array with the keys ‘field’, ‘value’, and ‘prev_value’.
Thanks!
May I know how could I access the other field values, do you have some code snippets? I’m trying to access another validated field in a repeater field (start_date) to compare to my end_date.
Thanks!
@dkdelosreyes
You should be able to do something like:
for ( $inputs as $input ){
if ( $input['field'] == 'the field i care about' ){
if ( $input['value'] != $value ){
return "the date values don't match";
}
break;
}
}