There is such a controller code
public function add(Request $request) { $validator = Validator::make($request->all(), [ 'title' => 'required' ]); return view('cars_add',[ 'validator' => $validator ]); }
and such html
<div class="item"> <label>Заголовок</label> <input type="text" name="title"> <?php if($errors->has('title')): ?> <span class="error"><?php echo $errors->first('title'); ?></span> <?php endif; ?> </div>
Why does the error information when an empty field does not come out, what's the problem?