Preview:
<!-- 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'
]);
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter