Hi
I need to check that the departure date is after the arrival date in a CMS model admin form. I've found out how to make the fields required and I see you can create custom fields to add custom validation for each field but not sure where or how to add validation that works across multiple fields?
At the moment my only validation is required fields on the DataObject:
e.g
class Tour extends DataObject{
private static $singular_name = "Tour";
private static $plural_name = "Tours";
private static $db = array(
'Departure' => 'Time',
'Arrival' => 'Time'
);
function getCMSValidator() {
return new RequiredFields(array('Departure', 'Arrival'));
}
Thanks