title: Access Symfony Assert in twig view
body: <p>Try to get the assert value defined in the entity in the view. </p>
  
  <p>Using: 
  Symfony 2.8
  Sonata Admin: 3.1</p>
  
  <p>I defined a assert in the model like this: </p>
  
  <pre><code> /**
   * @var string
   * @Assert\Length(
   *      min = 8,
   *      max = 60,
   *      minMessage = "Longer than {{ limit }}",
   *      maxMessage = "Shorter than {{ limit }}"
   * )
   * @ORM\Column(name="title", type="string", length=60)
   */
  private $title;
  </code></pre>
  
  <p>The admin form use a custom formtype to load the custom view: </p>
  
  <pre><code>    &lt;?php    
  namespace CustomBundle\Form;
  
  use Symfony\Component\Form\AbstractType;
  use Symfony\Component\Form\Extension\Core\Type\TextType;
  use Symfony\Component\Form\FormBuilderInterface;
  use Symfony\Component\OptionsResolver\OptionsResolver;
  
  class TextCountType extends AbstractType
  {
  
      public function getParent()
      {
          return TextType::class;
      }
  
  
  }
  </code></pre>
  
  <p>And the view: </p>
  
  <pre><code>   {% block text_count_widget %}
      {% spaceless %}
          {{ block('form_widget_simple') }}
          &lt;script&gt;
           // some custom live validation
           // HERE i need access to the Asserts
       &lt;/script&gt;
  
      {% endspaceless %}
  {% endblock %}
  </code></pre>
  
  <p>My question is:
  Is there a way to access the asserts in the twig code? 
  I do not wan't to redefine it in the admin class for every entity.</p>
  
  <p>Thank you for your help.</p>