Answer the question
In order to leave comments, you need to log in
How to force laravel validate to validate a field only if it is not empty?
There is a field to which I gave validation parameters: url | max:40 . The field is optional and may be empty. But in this case, I constantly get an error that the field does not fit the url format. Well, it's clear, it's empty. So how to explain to Lara that validation should be done only if the field is filled?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question