Monday, April 3, 2017

Validate in:post_fieds in laravel 5

It's posible to validate request with values from requests.

Simple example, I have FormRequest object with rules:

public function rules() {
    return [
        'id' => 'required|integer',
        'languages' => 'required|array',
        'default_language' => 'required|in:languages',
    ];
}

How to validate default_language which values must in languages ?



via Nguyễn Hoàng

Advertisement