title: validate Min option of integer field in Symfony2.1 application
body: <p>I created my form with this code : </p>
  
  <pre><code> public function creerConferenceAction($id = null) {
  
      $message = '';
      if (isset($id)) {
          $conference = $this-&gt;getDoctrine()
                  -&gt;getRepository('gestionConferenceApplicationBundle:Conference')
                  -&gt;find($id);
          if (!$conference) {
              throw $this-&gt;createNotFoundException('No conference found for id ' . $id);
          }
      }else{
          $conference = new Conference();            
      }
  
          $form = $this-&gt;createFormBuilder($conference)
              -&gt;add('titre', 'text')
              -&gt;add('ville', 'text')
              -&gt;add('lieu', 'text')
              -&gt;add('date_debut', 'date', array(
                  'widget' =&gt; 'single_text',
                  'format' =&gt; 'yyyy-MM-dd',
                  ))
               -&gt;add('date_fin', 'date')
              -&gt;add('nbMin', 'integer')
              -&gt;add('nbMax', 'integer')
              -&gt;add('dateLimiteInscription', 'date')
              -&gt;getForm();
  
  
      $request = $this-&gt;getRequest();
      if ($request-&gt;isMethod('POST')) {
          $form-&gt;bind($request);
          if ($form-&gt;isValid()) {
              $em = $this-&gt;getDoctrine()-&gt;getManager();
              $em-&gt;persist($conference);
              $em-&gt;flush();
              return $this-&gt;redirect($this-&gt;generateUrl('_acceuil'));
          }
      }
  
      return $this-&gt;render('gestionConferenceApplicationBundle:acceuil:creerConference.html.twig', array(
                  'form' =&gt; $form-&gt;createView(), 
              ));
  }
  </code></pre>
  
  <p>and I want to add  this constraint  :  the user cannot enter a value less than 5 in those fields : </p>
  
  <pre><code>-&gt;add('nbMin', 'integer')
          -&gt;add('nbMax', 'integer')
  </code></pre>
  
  <p>I tested this (I take it from the reference book) :</p>
  
  <pre><code> # src/gestionConference/ApplicationBundle/Resources/config/validation.yml
  gestionConference\ApplicationBundle\Entity\Conference:
    properties:
      age:
        - Min: { limit: 18, message: You must be 18 or older to enter. }
  </code></pre>
  
  <p>but it do nothing</p>
  
  <p>how can I achieve this</p>
  
  <p>thank you in advance </p>
  
  <hr>
  
  <h2>-------------------EDIT-------------------EDIT------------------------------</h2>
  
  <p>I read another time the reference and I realized that the min option  is removed in the latest version of symfony 2.1.3</p>
  
  <p>and I replaced it by : </p>
  
  <pre><code>    # src/gestionConference/ApplicationBundle/Resources/config/validation.yml
  gestionConference\ApplicationBundle\Entity\Conference:
    properties:
      nbmin:
        - Range:
            min: 120
            minMessage: You must be at least 120cm tall to enter
  </code></pre>
  
  <p>but no change</p>
  
  <p>here is the twig page : </p>
  
  <pre><code> {% extends "gestionConferenceApplicationBundle::layout.html.twig" %}
  {% block content %}
  &lt;div id="welcome"&gt;
      &lt;div class="content"&gt;
  
          &lt;form action="" method="post" {{ form_enctype(form) }}&gt;
                  {{ form_errors(form) }}
  
                  &lt;table&gt;
                      &lt;tr&gt;
                          &lt;td&gt;{{ form_label(form.titre, 'Titre : ') }}&lt;/td&gt;                        
                          &lt;td&gt;{{ form_widget(form.titre) }}&lt;/td&gt;
                          &lt;td&gt;{{ form_errors(form.titre) }}&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;{{ form_label(form.ville, 'Ville : ') }}&lt;/td&gt;
  
                          &lt;td&gt;{{ form_widget(form.ville) }}&lt;/td&gt;
                          &lt;td&gt;{{ form_errors(form.ville) }}&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;{{ form_label(form.lieu, 'Lieu : ') }}&lt;/td&gt;
  
                          &lt;td&gt;{{ form_widget(form.lieu) }}&lt;/td&gt;
                          &lt;td&gt;{{ form_errors(form.lieu) }}&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;{{ form_label(form.date_debut, 'Date de début : ') }}&lt;/td&gt;
  
                          &lt;td&gt;{{ form_widget(form.date_debut) }}&lt;/td&gt;
                          &lt;td&gt;{{ form_errors(form.date_debut) }}&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;{{ form_label(form.date_fin, 'Date de fin : ') }}&lt;/td&gt;
  
                          &lt;td&gt;{{ form_widget(form.date_fin) }}&lt;/td&gt;
                          &lt;td&gt;{{ form_errors(form.date_fin) }}&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;{{ form_label(form.nbMin, 'Nombre minimal de participants : ') }}&lt;/td&gt;                        
                          &lt;td&gt;{{ form_widget(form.nbMin) }}&lt;/td&gt;
                          &lt;td&gt;{{ form_errors(form.nbMin) }}&lt;/td&gt;
                      &lt;/tr&gt;
                     &lt;tr&gt;
                          &lt;td&gt;{{ form_label(form.nbMax, 'Nombre maximal de participants : ') }}&lt;/td&gt;                        
                          &lt;td&gt;{{ form_widget(form.nbMax) }}&lt;/td&gt;
                          &lt;td&gt;{{ form_errors(form.nbMax) }}&lt;/td&gt;
                      &lt;/tr&gt;
  
                      &lt;tr&gt;
                          &lt;td&gt;{{ form_label(form.dateLimiteInscription, 'Date limite d inscription : ') }}&lt;/td&gt;                        
                          &lt;td&gt;{{ form_widget(form.dateLimiteInscription) }}&lt;/td&gt;
                          &lt;td&gt;{{ form_errors(form.dateLimiteInscription) }}&lt;/td&gt;
                      &lt;/tr&gt;
                      {{ form_rest(form) }}
                      &lt;tr&gt;
                          &lt;td align="center" colspan=3 &gt;
                              &lt;input type="submit" style="width: 80px;height: 30px;margin-right: 25px;" value="valider" /&gt;
                              &lt;input type="reset" style="width: 80px;height: 30px;" value="initialiser" /&gt;
                          &lt;/td&gt;                        
                      &lt;/tr&gt;
  
  
  
  
                  &lt;/table&gt;
              &lt;/form&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  
  {% endblock %}
  </code></pre>