Closed ryanmitchell closed 3 years ago
Love the approach but we also should be able to override existing rules but that would be a bit tricky with the way the rules array is structured... So maybe we should restructure the rules laravel style...
As in key => value ? How would that work with the custom validator and passing messages. And just change here or change everywhere?
OK tracking back on this one, the approach is a bit tricky because of the rules array structure and merging the rules doesn't feel right.
Another way devs can add extra checkout validation is by adding their custom validator logic when igniter.checkout.beforeSaveOrder
event is fired.
What do you think?
Yep thats fair. I'll close this.
Allows devs/extensions to add checkout validation for extra fields.
When used in combination with Orders_model::extend(function($model) { $model->addFillable([ 'x' ]); and custom theme partials in an extension this means fields can be added quite easily.