第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

必填字段變?yōu)榧t色

必填字段變?yōu)榧t色

PHP
慕慕森 2022-07-09 16:51:59
幫助我在必填字段上假設(shè)在空時(shí)會改變顏色,如下所示:當(dāng)提交表單后出現(xiàn)必填字段時(shí), course_id 和grade_id 的下拉菜單應(yīng)變?yōu)榧t色。這是我用來創(chuàng)建過去教育表格的表格。form_modal.blade.php:    <div class="form-group required">        <label class="col-lg-2 control-label">{{ msg('lbl_institute') }}</label>        <div class="col-lg-4">            {!! Form::dropdown('institution_id', $institution, @$pasteducationinfo['institution_id'],'class="select2-form institution_id"') !!}        </div>    </div>    <div id="institution" class="form-group hide">        <label class="col-lg-2 control-label">{{ msg('lbl_institute') }}</label>        <div class="col-lg-4">            <input type="text" name="institution_name" class="form-control" value="{{ @$pasteducationinfo['institution_name'] }}" placeholder="SMK Cyberjaya">        </div>    </div>    @if(!empty($edulevelinfo['is_course_able']))    <div class="table-responsive repeater">        <table id="courseassessmentnew-table" class="table table-striped b-t b-b" data-repeater-list="pasteducation">            <thead>                <th>{!! msg('lbl_course') !!}</th>                <th>{!! msg('lbl_grade') !!}</th>                <th></th>            </thead>            <tbody>            @if(!empty($pasteducationdetailinfo))                @foreach($pasteducationdetailinfo as $detailinfo)                    @if (!empty($detailinfo->educationCourse->is_mandatory))                        <tr>                            <td>                                {!! $educourseselection[$detailinfo['course_id']] !!}                                <input type="hidden" name="course_id[]" value="{{ @$detailinfo['course_id'] }}">                            </td>                            <td>                                {!! Form::dropdown('grade_id[]', $gradeselection, $detailinfo['grade_id'],'class="select2-form"') !!}                            </td>                            <td></td>                        </tr>                    @else      
查看完整描述

2 回答

?
汪汪一只貓

TA貢獻(xiàn)1898條經(jīng)驗(yàn) 獲得超8個贊

如果您使用 Laravel 驗(yàn)證,這將對您有所幫助。


添加@error("input-name") is-invalid @enderror您的輸入類。


并顯示錯誤消息:


@error('email')

    <span class="invalid-feedback" role="alert">

        <strong>{{ $message }}</strong>

    </span>

@enderror

如果有任何錯誤,它會顯示為,

http://img1.sycdn.imooc.com//62c941f20001325406110081.jpg

查看完整回答
反對 回復(fù) 2022-07-09
?
慕后森

TA貢獻(xiàn)1802條經(jīng)驗(yàn) 獲得超5個贊

從 Bootstrap 4 => https://getbootstrap.com/docs/4.0/components/forms/?#validation

您需要is-validinstitution_id下拉列表中添加類


查看完整回答
反對 回復(fù) 2022-07-09
  • 2 回答
  • 0 關(guān)注
  • 120 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號