public function validate($value)
    {
        $result = !$this->isRequired;
        if ($this->isRequired()) {
            $result = !empty($value);
        }
        if (is_callable($this->validator)) {
            $result = call_user_func($this->validator, $value);
        }

        return $result;
    }
public function validate($value)
    {
        $result = !$this->isRequired;
        if ($this->isRequired()) {
            $result = !empty($value);
        }
        if (is_callable($this->validator)) {
            $result = call_user_func($this->validator, $value);
        }

        return $result;
    }
public function validate ( $ value ) { $ result = ! $ this -> isRequired ; if ( $ this -> isRequired ( ) ) { $ result = ! empty ( $ value ) ; } if ( is_callable ( $ this -> validator ) ) { $ result = call_user_func ( $ this -> validator , $ value ) ; } return $ result ; }
Validates option value

@param $value
@return bool|mixed
Validates option value