Answer the question
In order to leave comments, you need to log in
How in laravel to find out if the input passed the validation or not?
I am validating the form Validator::make
After successfully checking the value of one field, send another field for verification. Suppose after validation , with successful validation of this field, it will be necessary to proceed with the validation (Since the data for validation second is associated with data from first)
How can I implement this? <input name="first">
<input name="second">
Answer the question
In order to leave comments, you need to log in
Look here , if this is not the case, then there is a lot of everything in the documentation, read carefully, something will definitely suit you
In my opinion, you can check this way, but I'm not sure if the method is professional.
$error = Validator::make($request, [
'first' => 'required|numeric|max:255......'
];
if(!$error)
.......
Available Validation Rules: bail
Stop running validation rules after the first validation failure.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question