you can do this in your controller:
$validator = Validator::make($data = Input::all(), Framewrok::$rules);
$validator->sometimes('preferredframework', 'required', function($input) { return $input->usesframework == 1; });
reference: http://laravel.com/docs/validation#conditionally-adding-rules
you can do this in your controller:
$validator = Validator::make($data = Input::all(), Framewrok::$rules);
$validator->sometimes('preferredframework', 'required', function($input)
{
return $input->usesframework == 1;
});
reference: http://laravel.com/docs/validation#conditionally-adding-rules