I'm using media library for file field. I have a two fields custom_url and media field in my form which either custom_url OR media need to be filled.
I'm validating the form using laravel request validation and the required_without rule, which looks like this.
I'm using nova package.
Text::make(__('Custom Url'), 'custom_url')
->rules('required_without:file')
->help('Required without file upload'),
Files::make('File', 'file')
->rules('required_without:custom_url')
->help('Required without Custom URL'),
I am uploading file but although it's showing me error always Custom URL is required.
I think file field is returning null value. Can anyone please guide me that how may I do it?