Custom rule based on another field - Good way or not ?
I'm implementing a custom rule that verify that two dates are in the same year.
Custom Laravel Rule
Filament Form schema()
It works, but is that right do it like that ?
I started using
DataAwareRule
but the problem is that the form data are stored in a "sub-array" and therefore if I use $this->data['data']['field-name'] the rule will works with Filament (Livewire?) but not in another classic class like a Controller
.
0 Replies