Answers for "check form each input laravel"

0

check form each input laravel

<!-- form.blade.php -->
<div class="form-group col-md-6 mb-3">
   <label for="contact_lastname">Nom <span class="text-danger">*</span></label>
   <input type="text"
          class="form-control @if($errors->has('contact_lastname')) is-invalid @endif"
          id="contact_lastname" name="contact_lastname"
          aria-describedby="validation_contact_lastname">
   @if($errors->has('contact_lastname'))
   <div id="validation_contact_lastname" class="invalid-feedback">
     {{$errors->first('contact_lastname') }}
   </div>
   @endif
</div>

<!-- ContactsController.php -->
$request->validate([
   'contact_lastname' => 'required'
]);
Posted by: Guest on October-19-2021

Code answers related to "check form each input laravel"

Browse Popular Code Answers by Language