2

So i struggle with this, for a day | I use Laravel/Jetstream 8.x

i make a form for register but is-invalid wont show in the browser, bellow is example of code that wont show up

<div class="col">
    <input class="form-control @error('nama_f') is-invalid @enderror" type="text" id="name_f" name="name_f" placeholder="Front name">
    @error ('nama_f')<div class="invalid-feedback">this is invalid</div> @enderror
</div>

here's what the browser respond

<div class="col">
    <input class="form-control " type="text" id="name_f" name="name_f" placeholder="Front name">
</div>

it's put a space so it mean its there but somehow no

i tried few stuff like @if

    @if ($errors->any()) 
        <div style="color: red; font-size:15px">
            Please choose a username.
        </div>
    @endif

this work fine, but will show up when any error appear which a no

also Jetstream default is nice, but showing up name that shouldn't show up i have no idea how to custom it, but i can hide it so thats why i use is-invalid *pic when it show default error msg *

Fal
  • 31
  • 3

1 Answers1

0

You have a typo.

@error('nama_f') is-invalid @enderror

should be

@error('name_f') is-invalid @enderror