[英]Display multiple input array validation in ajax in Laravel
I would like to ask on how to display through ajax the json return of form validation message in laravel 我想问一下如何通过ajax在laravel中显示表单验证消息的json返回
Here are my some of my form input: 这是我的一些表单输入:
{!! Form::text('stories[0][subject]', null, [ 'class' => 'form-control' ]) !!}
{!! Form::select('stories[0][country]', $country, null , [ 'class' => 'country form-control selectpicker','data-live-search' => 'true' ]) !!}
{!! Form::text('stories[0][url]', null, [ 'class' => 'form-control' ]) !!}
Here's the json return of the error messages: 这是错误消息的json返回:
Maybe this could help you laravel ajax validation not showing for all fields 也许这可以帮助您在所有字段中不显示laravel ajax验证
You can loop through all errors and then append them to your validation div. 您可以遍历所有错误,然后将它们附加到验证div。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.