我的验证表单工作正常,看起来像这样:
{!! Form::email('email', null, array('placeholder' => 'Email', 'class' => 'form-control ')) !!}
{{$errors->first('email')}}
如果电子邮件质量不佳,则会出现此错误:该电子邮件已被接收。
事实是,我也不想像在输入上放置css类那样error
在输入上添加红色背景边框。
我怎样才能做到这一点?
这是我的正确答案,无需使用其他div's
:
{!! Form::email('email', null, $attributes = $errors->has('email') ? array('placeholder' => 'Email', 'class' => 'form-control has-error') : array('placeholder' => 'Email', 'class' => 'form-control')) !!}
{{$errors->first('email')}}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句