+ //CRM-21523
+ if (!empty($fields['is_repeat']) &&
+ (empty($fields['repetition_frequency_interval']) || ($fields['end_frequency_interval'] == NULL))
+ ) {
+ $errors['is_repeat'] = ts('If you are enabling repetition you must indicate the frequency and ending term.');
+ }
+