Bootstrap 4 invalid feedback with input group not displaying

前端 未结 10 968
遇见更好的自我
遇见更好的自我 2021-02-04 00:38

I have been looking into Bootstrap 4 - beta, however when using .is-invalid with .input-group it doesn\'t seem to show up.

10条回答
  •  攒了一身酷
    2021-02-04 01:06

    The way Bootstrap does override the display from none to block is by checking first for a previous is-invalid class, for example! Check this CSS out:

    That means, in case of an error, first is-invalid must be applied on an element and then invalid-feedback on another afterward! Like the following in Laravel, for instance:

    {{-- Either following an input --}}
    
    
    
    @error('register_password')
        
            {{ $message }}
        
    @enderror
    
    {{-- Or separately in DOM --}}
    
    @error('register_password')
        
    ...
    {{ $message }} @enderror

提交回复
热议问题