i just install laravelcollective 5.8 and try to put error class on input form like this
{{Form::number('nik', '', ['id'=>'nik','min'=>'1','max'=>'999999','class'=>'form-control @error('nik') is-invalid @enderror','placeholder'=>'E.g: 1234','required'])}}
first i got error
syntax error, unexpected 'nik' (T_STRING), expecting ']'
and i try to change @error('nik') to @error("nik") , but no luck, this what happen on inspect element
<input id="nik" min="1" max="999999" class="form-control <?php if ($errors->has("nik")) :
if (isset($message)) { $messageCache = $message; }
$message = $errors->first("nik"); ?> is-invalid <?php unset($message);
if (isset($messageCache)) { $message = $messageCache; }
endif; ?>" placeholder="E.g: 1234" required="" name="nik" type="number" value="">
this how should be on native laravel blade
<input required min="1" max="999999" id="nik" class="form-control @error('nik') is-invalid @enderror" type="number" name="nik" placeholder="E.g: 1234">
and inspect element will be :
<input required="" min="1" max="999999" id="nik" class="form-control " type="number" name="nik" placeholder="E.g: 1234">
anyone know how to solve this, i'll so greatfull.. thank you...