Saturday, March 11, 2017

Laravel 5.4 required_with doesn't works with alpha_dash and min

That's my validation code:

'old_password' => 'max:255|required_with:new_password|old_password',
'new_password' => 'max:255|required_with:old_password|min:6|alpha_dash',

I've got alpha_dash and min:6 validation fails if both fields is empty. How can I fix it?



via fiter

Advertisement