Custom error messages in Silex

Posted on
$form = $app['form.factory']
    ->createBuilder('form')
    ->add('email', 'text', array(
        'constraints' => new AssertEmail(array(
            'message' => 'Your custom message'
        ))
    ))

Leave a Reply

Your email address will not be published.