Browse files

instanceof

  • Loading branch information...
1 parent be403e9 commit 2d7a03416c8106db02a8989d1745922166b4b5f0 @recipe recipe committed Sep 1, 2012
Showing with 6 additions and 4 deletions.
  1. +1 −1 EventListener/ValidationGroupsListener.php
  2. +5 −3 README.md
View
2 EventListener/ValidationGroupsListener.php
@@ -20,7 +20,7 @@ public function onJsfvPreProcess(PreProcessEvent $event)
$formView = $event->getFormView();
$formValidationGroups = !empty($formView->vars['validation_groups']) ?
$formView->vars['validation_groups'] : array('Default');
- if (is_object($formValidationGroups) && is_a($formValidationGroups, 'Closure')) {
+ if ($formValidationGroups instanceof \Closure) {
// !TODO It couldn't be processed in current implementation.
// No one constraint will be excluded in this case.
return;
View
8 README.md
@@ -1,14 +1,16 @@
-Getting Started With JsFormValidationBundle [![Build Status](https://secure.travis-ci.org/Abhoryo/APYJsFormValidationBundle.png?branch=master)](http://travis-ci.org/Abhoryo/APYJsFormValidationBundle)
+Getting Started With JsFormValidationBundle
===========================================
+**Version**: 2.1
+[![Build Status](https://secure.travis-ci.org/Abhoryo/APYJsFormValidationBundle.png?branch=master)](http://travis-ci.org/Abhoryo/APYJsFormValidationBundle)
+
+**Compatibility**: Symfony 2.1+
This bundle generate automatically a script to perform validations of a form in javascript.
It use the same constraints defined with annotations in your entity or your document.
This bundle is `g11n` compatible.(i18n + L10n)
-**Version**: 2.1
-**Compatibility**: Symfony 2.1+
## Prerequisite

0 comments on commit 2d7a034

Please sign in to comment.