I\'ve got a form with extra fields added with the option mapped
to false
. But when I try to validate my form, it won\'t pass indicating \"this valu
If you are already using a constraint then you can do this:
$builder
->add('new', 'repeated', array(
'type' => 'password',
'required' => true,
'invalid_message' => 'crmpicco.status.password_mismatch',
'constraints' => array(
new NotBlank(),
new Assert\Length([
'min' => 2,
'max' => 50,
'minMessage' => 'Your first name must be at least 2 characters long',
'maxMessage' => 'Your first name cannot be longer than 2 characters',
])
)
))
->add('save', 'submit', array(
'label' => 'password.form.fields.save',
))
;