title: How to create custom form date validation error messages in Symfony 4
body: <p>Using Symfony 4, I have a form with a date field. Safari (MacOS) and I.E. do not support HTML5 date pickers. When a user submits a date (without using a date picker), I want the error message to read "Please format your date yyyy-mm-dd" instead of the default "This value is not valid."</p>
  
  <p>Here is my form class:</p>
  
  <pre><code>class MyType extends AbstractType
  {
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder
              -&gt;add('date', DateType::class, [
                      'widget' =&gt; 'single_text',
              ])
          ;
      }
  
      public function configureOptions(OptionsResolver $resolver)
      {
          $resolver-&gt;setDefaults([
                  'data_class' =&gt; MyEntity::class,
          ]);
      }
  }
  </code></pre>
  
  <p>Here is my entity class:</p>
  
  <pre><code>class MyEntity
  {
     /**
       * @Assert\NotBlank()
       * @Assert\Date()
       */
      private $date;
  
      public function getDate()
      {
          return $this-&gt;date;
      }
  
      public function setDate($date)
      {
          $this-&gt;date = $date;
      }
  }
  </code></pre>
  
  <p>I tried:</p>
  
  <pre><code>/**
   * @Assert\NotBlank()
   * @Assert\Date(
   *      message="Please format your date yyyy-mm-dd."
   * )
   */
  private $date;
  </code></pre>
  
  <p>I can customize the error messages for TextType form fields, but cannot find any examples for DateType. Any help would be appreciated. Thanks.</p>