- Laravel Version: 8.*
- Nova Version: 3.30.0
- PHP Version: 8.*
I want to validate unrequited field just when inputs are filled. So the filed should be required if it's empty. I have field like this:
Text::make(__('Slug'), 'slug')->hideFromIndex()
->rules('sometimes', 'string', 'min:2', 'max:255'),
But when the filed is empty validation return false and shows error message. I also tried nullable() but still doesn't work. Also I tried it without sometimes.