/**
  * @param string $name
  * @return mixed
  */
 protected function getValue($name)
 {
     if ($this->request->has($name)) {
         return $this->request->get($name);
     } elseif ($this->request->hasFiles($name)) {
         return $this->request->getFiles($name);
     } else {
         return null;
     }
 }
 public function validateAll(Request $request)
 {
     if ($request->get('selection') == '1' && $this->isEmpty($request->get('input_text'))) {
         $this->setErrorMessage('input_text', 'selectionが1の場合はinput_textを入力してください');
     }
 }