Skip to content
This repository has been archived by the owner on Feb 26, 2018. It is now read-only.

Should support Laravel 5.2 new array validation #82

Open
simplenotezy opened this issue Dec 25, 2015 · 1 comment
Open

Should support Laravel 5.2 new array validation #82

simplenotezy opened this issue Dec 25, 2015 · 1 comment

Comments

@simplenotezy
Copy link

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]') !!}
@adamwathan
Copy link
Owner

Yeah great idea, will try and play with it in the near future, but happy to look at PRs in the meantime.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants