bootforms
bootforms copied to clipboard
Should support Laravel 5.2 new array validation
Hello! This package should defiantly support the new Laravel 5.2 array validation. Like this:
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'name' => 'min:3',
'slug' => 'min:2',
'description' => '',
'coveriamge' => 'image',
'start' => 'required|date_format:Y-m-d H:i:s',
'tickettype.*.tickettype_id' => 'exists:ticket_types,id',
'tickettype.*.name' => 'min:3|max:50',
'tickettype.*.description' => 'max:255',
'tickettype.*.price' => 'integer|between:1,5000',
'tickettype.*.currency' => 'required|exists:currencies,code',
'tickettype.*.only_members' => 'integer',
'tickettype.*.quantity' => '',
'tickettype.*.required_subscriptions' => '',
];
}
And:
{!! BootForm::text('Name', 'tickettype[][name]') !!}
Yeah great idea, will try and play with it in the near future, but happy to look at PRs in the meantime.