diff --git a/src/Select2.php b/src/Select2.php index 5b815bf..3b593f2 100644 --- a/src/Select2.php +++ b/src/Select2.php @@ -459,7 +459,14 @@ protected function isRequired() $validators = $this->model->getActiveValidators($this->attribute); foreach ($validators as $validator) { if ($validator instanceof RequiredValidator) { - return true; + if (is_callable($validator->when)) { + if (call_user_func($validator->when, $this->model, $this->attribute)) { + return true; + } + } else { + return true; + } + } } return false;