symfony API

sfValidator Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

Packages

You are currently browsing the symfony API for the 1.3 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfValidatorBase allows you to apply constraints to user entered parameters.

Method Summary

  • bool execute(, )
    Executes this validator.
  • sfContext getContext()
    Retrieves the current application context.
  • mixed getParameter(, )
    Retrieves a parameter from the validator.
  • sfParameterHolder getParameterHolder()
    Retrieves the parameters from the validator.
  • boolean hasParameter()
    Indicates whether or not a parameter exist for the validator.
  • bool initialize(, )
    Initializes this validator.
  • setParameter(, )
    Sets a parameter for the validator.
  • __construct()
    Class constructor.

Method Details

  • (bool) execute (, )

    Executes this validator.

    returns true, if this validator executes successfully, otherwise false

  • (sfContext) getContext ()

    Retrieves the current application context.

    returns The current sfContext instance

  • (mixed) getParameter (, )

    Retrieves a parameter from the validator.

    returns A parameter value

  • (sfParameterHolder) getParameterHolder ()

    Retrieves the parameters from the validator.

    returns List of parameters

  • (boolean) hasParameter ()

    Indicates whether or not a parameter exist for the validator.

    returns true, if parameter exists, otherwise false

  • (bool) initialize (, )

    Initializes this validator.

    returns true, if initialization completes successfully, otherwise false

  • setParameter (, )

    Sets a parameter for the validator.

  • __construct ()

    Class constructor.