in an ACF front-end form i’ve made, i’ve got a repeater field to add “cities” (it’s a road trip planning tool).
Each line ( = city) of the repeater have a starting date and an endind date field.
I’d like, for each city, make sure that starting date is anterior to ending date.
My plan was to hook on acf/validate_value with key=my_repeater_field and then for each, do my comparison stuff.
Hello again, I tried solving this by myself, but no luck so far.
For context :
– “Cities” is a repeater field. Each row is a “city” (a city where you stop while on a road trip).
– For each row (city), I ask for start_date and end_date (arrival & departure); these fields (respectively field_5d720d97435c3 and field_5d720db1435c4 are inside a group field field_5d720d70435c2)
I’d like to make sure, for each row INDEPENDANTLY that start_date < end_date
So far, as soon as a row is not valid, error appears for each row, even if its valid.
I have no idea to validate each row independantly.