Sometimes, you need to create a DTO object to make a form which relates many entities.
Your entity constraints are not applied in your registration form because you must declare these fields are unmapped (or mapped to an DTO object instead of your real entity).
You have an entity to store username / password and another entity to store the user informations like firstName, lastName, address…
You create a form which relates your DTO object or which has some unmapped fields.
You only have to add the "constraints_from_entity" option to declare the "real" related entity and the "constraints_from_property" option to declare the "real" related entity field.
If constraints_from_property
is not set, it finds the same property name.
When your form is submitted, these options are read and related constraints will be applied on your field.