symfony API

sfCallbackValidator Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to API menu

1.2 API OpenSearch


You are currently browsing the symfony API for the 1.2 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.

sfCallbackValidator allows you to use a custom callback function or method to validate the input. The function should return true on valid and false on invalid and should be callable using is_callable().


sfCallbackValidator  <  sfValidator

Method Summary

  • boolean execute(&amp;$value, &amp;$error)
    Executes this validator.
  • boolean initialize((sfContext) $context, $parameters = null)
    Initializes this validator.

Methods inherited from sfValidator

execute , getContext , getParameter , getParameterHolder , hasParameter , initialize , setParameter , __construct

Method Details

  • (boolean) execute (&$value, &$error) Browse code

    &$value A parameter value
    &$error An error message reference

    Executes this validator.

    returns true, if this validator executes successfully, otherwise false

  • (boolean) initialize ((sfContext) $context, $parameters = null) Browse code

    $context The current application context
    $parameters An associative array of initialization parameters

    Initializes this validator.

    returns true, if initialization completes successfully, otherwise false