symfony API

sfValidatorRegex Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.4 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.4 version. Switch to:

sfValidatorRegex validates a value with a regular expression.

Inheritence

sfValidatorUrl, sfValidatorEmail  <  sfValidatorRegex  <  sfValidatorString < sfValidatorBase

Method Summary

  • configure($options, $messages)
    Configures the current validator.
  • doClean()
    @see sfValidatorString
  • string getPattern()
    Returns the current validator's regular expression.

Methods inherited from sfValidatorString

configure , doClean

Methods inherited from sfValidatorBase

addMessage , addOption , addRequiredOption , asString , clean , configure , doClean , getCharset , getDefaultMessages , getDefaultOptions , getEmptyValue , getErrorCodes , getMessage , getMessages , getMessagesWithoutDefaults , getOption , getOptions , getOptionsWithoutDefaults , getRequiredOptions , hasOption , isEmpty , setCharset , setDefaultMessage , setDefaultMessages , setDefaultOptions , setMessage , setMessages , setOption , setOptions , __construct

Method Details

  • configure ($options, $messages) Browse code

    $options An array of options
    $messages An array of error messages

    Configures the current validator.


    Available options:

    * pattern: A regex pattern compatible with PCRE or {@link sfCallable} that returns one (required)
    * must_match: Whether the regex must match or not (true by default)

  • doClean () Browse code

    @see sfValidatorString

  • (string) getPattern () Browse code

    Returns the current validator's regular expression.