Closed Reached closed 5 years ago
@Reached Interesting! What was the exact validation error you received? I'll look into it!
My bad, I simply think that I made a mistake somewhere! It appears to be working correctly now 🤔 Sorry if I wasted your time!
Describe the bug A clear and concise description of what the bug is.
When trying to add a coupon code a 422 validation error is thrown.
To Reproduce Steps to reproduce the behavior:
{code: 'somecode'}
Might help My assumption is that the rules array is colliding with the custom rules array set in the configuration file, because I tried to override the original rules array in CartDiscountController.php
$rules = ['required', 'string'];
with my own implementation it worked:instead of
But obviously this is not compatible with the custom rules 🤔