sfAjaxFormValidationPlugin - 0.0.4

Adds ajax validation to sfForms using their validators. The plugin requires jQuery.

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Releases Changelog Contribute
Show source

sfAjaxFormValidationPlugin plugin (for symfony 1.4)

The sfAjaxFormValidationPlugin is a symfony plugin that provides ajax form validation by sfForms validators.

Each time an element of the form loses its focus (onblur event), an ajax request is sent to the plugin module (using jQuery). The module uses sfForm validators to validate the value of the form element.


  • Install the plugin (via a package)

    symfony plugin:install -s beta sfAjaxFormValidationPlugin
  • Install the plugin (via a Subversion checkout)

    svn co http://svn.symfony-project.com/plugins/sfAjaxFormValidationPlugin/trunk plugins/sfAjaxFormValidationPlugin
  • Install the plugin (via a Subversion externals)

    svn pg svn:externals plugins > plugins.externals
    echo 'sfAjaxFormValidationPlugin http://svn.symfony-project.com/plugins/sfAjaxFormValidationPlugin/trunk' >> plugins.externals
    svn ps svn:externals --file plugins.externals plugins
    svn ci plugins
    svn up plugins
  • Activate the plugin in the config/ProjectConfiguration.class.php

    class ProjectConfiguration extends sfProjectConfiguration
      public function setup()
  • Enable module in your settings.yml

        enabled_modules: [default, sfAjaxFormValidation]
  • Clear your cache

    symfony cc


Add the following code to your template where you have a form you want to be validated with ajax:

<?php use_helper('sfAjaxFormValidation') ?>
<?php use_ajax_validation_for_form($form) ?>


  • Support embedded forms
  • Support global form errors?