original_string: function validate($value, $options = null)
      {
          if (isset($this->_data[$this->name])) {
              $callback = $this->_data[$this->name];
              if (isset($callback[1])) {
                  return call_user_func(array($callback[1], $callback[0]), $value, $options);
              } elseif ($this->_BCMode[$this->name]) {
                  return $callback[0]('', $value, $options);
              } else {
                  return $callback[0]($value, $options);
              }
          } elseif (is_callable($options)) {
              return call_user_func($options, $value);
          } else {
              return true;
          }
      }
code: function validate($value, $options = null)
      {
          if (isset($this->_data[$this->name])) {
              $callback = $this->_data[$this->name];
              if (isset($callback[1])) {
                  return call_user_func(array($callback[1], $callback[0]), $value, $options);
              } elseif ($this->_BCMode[$this->name]) {
                  return $callback[0]('', $value, $options);
              } else {
                  return $callback[0]($value, $options);
              }
          } elseif (is_callable($options)) {
              return call_user_func($options, $value);
          } else {
              return true;
          }
      }
code_tokens: function validate ( $ value , $ options = null ) { if ( isset ( $ this -> _data [ $ this -> name ] ) ) { $ callback = $ this -> _data [ $ this -> name ] ; if ( isset ( $ callback [ 1 ] ) ) { return call_user_func ( array ( $ callback [ 1 ] , $ callback [ 0 ] ) , $ value , $ options ) ; } elseif ( $ this -> _BCMode [ $ this -> name ] ) { return $ callback [ 0 ] ( '' , $ value , $ options ) ; } else { return $ callback [ 0 ] ( $ value , $ options ) ; } } elseif ( is_callable ( $ options ) ) { return call_user_func ( $ options , $ value ) ; } else { return true ; } }
docstring: Validates a value using a callback
  
  @param     string    $value      Value to be checked
  @param     mixed     $options    Options for callback
  @access    public
  @return    boolean   true if value is valid
docstring_tokens: Validates a value using a callback