Hint: it's not Symfony!. It's our friend HTML5. When Symfony renders the field, it's
adding a required="required" attribute, and this activates HTML5 validation.
But, there are a few problems with this. First, Symfony always adds the required
attribute... even if it's not actually required in the database. It'a a borderline
bug in Symfony.
And actually, that's not totally fair. If you use field-type-guessing, Symfony will
guess whether or not it should render this by looking at your database and validation
config. But as soon as you set your field type, it stops doing that. Boo!
Here's the second problem: even if we like this HTML5 client-side validation, we
still need to add true server-side validation. Otherwise, nasty users can go crazy
on our site.