我想使用数字而不是电子邮件登录:所以,我将代码更改为:
<div class="panel-body">
<form class="form-horizontal" method="POST" action="{{ route('login') }}">
{{ csrf_field() }}
<div class="form-group{{ $errors->has('matric_no') ? ' has-error' : '' }}">
<label for="matric_no" class="col-md-4 control-label">Matric No</label>
<div class="col-md-6">
<input id="matric_no" class="form-control" type="number" name="matric_no" value="{{
old('matric_no') }}" required autofocus>
@if ($errors->has('matric_no'))
<span class="help-block">
<strong>{{ $errors->first('matric_no') }}</strong>
</span>
@endif
</div>
</div>
但是每次我尝试登录时,错误都是:
电子邮件字段是必需的。
一只名叫tom的猫