dimanche 19 avril 2020

in laravel, submit a form using ajax, then how can be write it laravel validation for null field?

i write like this but didn't get

$data = $request->all();

$rules = array('a' => 'required|max:2|digits:2|regex:/^[0-9]+$/');

$messages = array('a.required' => 'sub head number required');

$validator = Validator::make($data, $rules, $messages);


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire