compucorp / uk.co.compucorp.membershipextras

Membership Extras for CiviCRM
Other
5 stars 8 forks source link

MAE-739: Validate next_schedule_contribution_date/cycle_day when updating a recurring contribution #433

Closed olayiwola-compucorp closed 2 years ago

olayiwola-compucorp commented 2 years ago

Overview

This PR adds new validation to the edit recurring contribution screen, such that the following scenarios would return an error

Before

Validation does not exist

After

A validation error is thrown when any of the invalid scenarios happen:

_frequency_unit is monthly; changing the next_schedulecontribution date to a day after 28 contrib

_frequency_unit is yearly; changing the next_schedulecontribution date to Feb 29 contrib_yr

_frequency_unit is monthly; changing the cycleday to a day after 28 cycleday