Before now, the validation performed in the front-end is different from that performed in the back-end when creating a new membership with a payment plan, in this PR we ensure the same validation happens on both the front-end and back-end.
It also includes the work done in this PR where we prevent users from selecting membership types with different periods and duration.
Before
Currently, changes in the UI can allow a user to get around the validation, in some cases, this leads to errors, at times the user is able to create a membership with recurring membership bypassing the validation.
After
Now the validation logic that happens in the backend also happens in the frontend.
Technical Details
We create a new class CRM_MembershipExtras_Helper_InstalmentValidator that acts as a helper class in performing necessary validation logic for creating a new membership with a payment plan.
Overview
Before now, the validation performed in the front-end is different from that performed in the back-end when creating a new membership with a payment plan, in this PR we ensure the same validation happens on both the front-end and back-end.
It also includes the work done in this PR where we prevent users from selecting membership types with different periods and duration.
Before
Currently, changes in the UI can allow a user to get around the validation, in some cases, this leads to errors, at times the user is able to create a membership with recurring membership bypassing the validation.
After
Now the validation logic that happens in the backend also happens in the frontend.
Technical Details
We create a new class
CRM_MembershipExtras_Helper_InstalmentValidator
that acts as a helper class in performing necessary validation logic for creating a new membership with a payment plan.