Browse Source

Update doc for conditional validation

Rémi Marseille 13 years ago
parent
commit
12dee983fe
1 changed files with 9 additions and 9 deletions
  1. 9 9
      Resources/doc/reference/conditional_validation.rst

+ 9 - 9
Resources/doc/reference/conditional_validation.rst

@@ -34,7 +34,7 @@ object. The object can be use to check assertion against a model :
                 ->with('enabled')
                     ->assertNotNull()
                     ->assertTrue()
-                ->end()
+                ->end();
         }
 
 .. note::
@@ -45,7 +45,7 @@ object. The object can be use to check assertion against a model :
 Using this validator
 --------------------
 
-Just add the ``InlineConstraint`` class constraint, like this :
+Just add the ``InlineConstraint`` class constraint, like this:
 
 .. code-block:: xml
 
@@ -56,15 +56,15 @@ Just add the ``InlineConstraint`` class constraint, like this :
         </constraint>
     </class>
 
-There are two important options :
+There are two important options:
 
-  - ``service`` : the service where the validation method is defined
-  - ``method``  : the service's method to call
+  - ``service``: the service where the validation method is defined
+  - ``method``: the service's method to call
 
-The method must accept two arguments :
+The method must accept two arguments:
 
- - ``ErrorElement`` : the instance where assertion can be check
- - ``value``  : the object instance
+ - ``ErrorElement``: the instance where assertion can be check
+ - ``value``: the object instance
 
 
 Sample with the ``PageBundle``
@@ -82,7 +82,7 @@ Sample with the ``PageBundle``
     {
         // ... code removed for simplification
 
-        function validateBlock(ErrorElement $errorElement, BlockInterface $block)
+        public function validateBlock(ErrorElement $errorElement, BlockInterface $block)
         {
             $errorElement
                 ->with('settings.url')