You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
If i try to get the messages for a single field i get nothing, but if i get the messages of the form for the field with "$form->getMessagesFor('xyz')" it works correctly.
Code to reproduce:
// Form field$element = $this->add(newElement\Mail('mail'));
$element->addValidator(
newValidator\PresenceOf(array(
'message' => $this->getDi()->get('translator')->query('front.form.error.PresenceOf'),
))
);
// Controller for example$mail = $form->get('mail');
echo'<pre>';
var_dump($mail->getMessages()); // Wrong - No messagesvar_dump($form->getMessagesFor('mail')); // Correct - PresenceOf Messageecho'</pre>';
The text was updated successfully, but these errors were encountered:
Hi!
If i try to get the messages for a single field i get nothing, but if i get the messages of the form for the field with "$form->getMessagesFor('xyz')" it works correctly.
Code to reproduce:
The text was updated successfully, but these errors were encountered: