jeudi 5 septembre 2019

Array field name validation issue

I have fields with array field names and I am having issues validating the fields. An example is: user[first_name]

$this->validate(request(), [
    'user[first_name]' => 'required|min:15',
]);

if ($errors->any()) {
  print_r($errors->all());exit;
}

It seems that Laravel does not detect the field this way, I get user[first_name] is required.

Help will be appreciated.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire