I have some questions all conected, so I will ask all of them here:
[Solved] I have date fields which can be nullable and when I don't fill them they are displayed as 2012-08-09 - today's date, although when I check in the database they are NULL. I have @ORM\Column(type="date", nullable=true) and @Assert\Date above both of them.
I have form validation @Assert\Date and @Assert\NotBlank() but I violate this constrains nothing happens although I have {{ form_errors(form) }}. How to show what exactly is wrong with the form?
[Solved] The last one is that I have NotBlank() constrain above a field called $currency. This is how I add it:
$builder->add('currency', 'choice', array( 'choices' => array( 'empty_value' => '--- Choose ---', 'USD' => 'USD', 'HKD' => 'HKD')));
but if I don't set anything (it stays --- Choose ---- ) it accepts it, although it's empty. I want the default choice to be --- Choose ---, but it musn't be allowed to leave it this way and the form to be valid in the same time.
I would appreciate your help!