# 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. ## Installation ## * 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` [php] class ProjectConfiguration extends sfProjectConfiguration { public function setup() { $this->enablePlugins(array( 'sfDoctrinePlugin', 'sfAjaxFormValidationPlugin', '...' )); } } * Enable module in your `settings.yml` all: .settings: enabled_modules: [default, sfAjaxFormValidation] * Clear your cache symfony cc ## Usage ## Add the following code to your template where you have a form you want to be validated with ajax: [php] ## TODO ## * Support embedded forms * Support global form errors?