requiredWithout validation
I am trying to run a requiredWithout validation rule, I want contact number to be required if email is null. The issue I am having is that contact number is inside the schema of a fieldset that is from the profile model. Where as email is on user directly.
This is my current attempt. But getting this error: An attempt was made to evaluate a closure for [Filament\Forms\Components\TextInput], but [$form] was unresolvable.
If I just have the requiredWithout('email') the validation is looking for data.profile.email which is incorrect as email isn't in profile, and if I call user.email its then searching data.profile.user.email
This is my current attempt. But getting this error: An attempt was made to evaluate a closure for [Filament\Forms\Components\TextInput], but [$form] was unresolvable.
If I just have the requiredWithout('email') the validation is looking for data.profile.email which is incorrect as email isn't in profile, and if I call user.email its then searching data.profile.user.email