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

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

Laravel登錄錯(cuò)誤消息未通過引導(dǎo)模式中的ajax顯示

Laravel登錄錯(cuò)誤消息未通過引導(dǎo)模式中的ajax顯示

PHP
慕桂英4014372 2023-10-22 21:01:06
當(dāng)我輸入錯(cuò)誤的憑據(jù)時(shí),不會(huì)顯示錯(cuò)誤消息。 我創(chuàng)建了自己的登錄身份驗(yàn)證路線。// Auth::routes(); //Commented this out// Authentication StartRoute::get('/login', 'Auth\LoginController@showLoginForm')->name('auth.login.get');Route::post('submit-login', 'Auth\LoginController@login')->name('auth.login.post');Route::post('/logout', 'Auth\LoginController@logout')->name('logout');Route::get('/register', 'Auth\RegisterController@showRegistrationForm')->name('auth.register.get');Route::post('submit-register', 'Auth\RegisterController@register')->name('auth.register.post');// Authentication End這是 ajax 部分window.getLoginPage = function(){  $.ajax({    type:'GET',    url:'/login',    success:function(response) {      $('.dynamicAuthContent').html('');      $('.dynamicAuthContent').append(response);      $('#myModal').modal('show');      $('.modalBtns').removeClass('activeAuth');      $('.signInModal').addClass('activeAuth');    }  });}這是模態(tài)體<div class="modal-body">     <div class="dynamicAuthContent"></div></div>這是login.blade.php<form method="POST" action="{{ route('auth.login.post') }}">    @csrf    <div class="form-group row">        <label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label>        <div class="col-md-6">            <input id="email" type="email" class="bColor form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}"  autocomplete="email" autofocus>            @error('email')                <span class="invalid-feedback" role="alert">                    <strong>{{ $message }}</strong>                </span>            @enderror        </div>    </div>一切正常,但是當(dāng)我輸入錯(cuò)誤的憑據(jù)時(shí),我的錯(cuò)誤沒有顯示。 但是當(dāng)我直接訪問該頁(yè)面而不是通過 ajax 時(shí),錯(cuò)誤消息是可見的。 我認(rèn)為我的錯(cuò)誤消息來了,但模式正在關(guān)閉。我怎樣才能避免這種情況?
查看完整描述

1 回答

?
慕尼黑的夜晚無繁華

TA貢獻(xiàn)1864條經(jīng)驗(yàn) 獲得超6個(gè)贊

您不能將刀片錯(cuò)誤包與 ajax 一起使用,因?yàn)樗鼈冎粫?huì)在設(shè)置錯(cuò)誤變量時(shí)呈現(xiàn),因此在 ajax 的情況下,您必須調(diào)用錯(cuò)誤函數(shù),就像在 ajax 中調(diào)用成功函數(shù)一樣,在側(cè)錯(cuò)誤函數(shù)中,您可以添加新的 DOM 元素來顯示錯(cuò)誤, 來。


查看完整回答
反對(duì) 回復(fù) 2023-10-22
  • 1 回答
  • 0 關(guān)注
  • 487 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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