1 views_handler_argument.inc views_handler_argument::validate_argument_basic($arg)

Provide a basic argument validation.

This can be overridden for more complex types; the basic validator only checks to see if the argument is not NULL or is numeric if the definition says it's numeric.

File

core/modules/views/handlers/views_handler_argument.inc, line 1055
@todo.

Class

views_handler_argument
Base class for arguments.

Code

function validate_argument_basic($arg) {
  if (!isset($arg) || $arg === '') {
    return FALSE;
  }

  if (!empty($this->definition['numeric']) && !isset($this->options['break_phrase']) && !is_numeric($arg)) {
    return FALSE;
  }

  return TRUE;
}