Joined September 2014
·

anthony cha

jamaica
·
·

you can do this in your controller:

$validator = Validator::make($data = Input::all(), Framewrok::$rules);

$validator->sometimes('preferredframework', 'required', function($input)
{
return $input->uses
framework == 1;
});

reference: http://laravel.com/docs/validation#conditionally-adding-rules

Achievements
1 Karma
0 Total ProTip Views