Hi Diego, FieldError also contains the parameters for the error message. I prefer a clear interface - if getErrors() returns a list of FieldError objects, addError() should accept a FieldError object. No magic.
Thanks for your input, Bernhard -- Software Architect & Engineer Blog: http://webmozarts.com Twitter: http://twitter.com/webmozart 2010/11/21 Diego <[email protected]>: > > Hello everyone and congratulations for the good work on Symfony2! > > We are currently developing a big project on S2 (going on from 6 > months now). We have been very happy so far. We update to symfony > master (from git's  fabpot/symfony) every couple of months. > > In the last update we notice that form element's addError methods now > needs a Symfony\Component\Form\FieldError instance. No problem with > that, we may update, but wouldnt it be better that addError accepts > just a plain text message and internally cast it to FieldError? We use > ->addError to manually add errors in complex contextual validations > (as in CSV imports) and it feels a little strange to have to go > $someField->addError(new FieldError("Some msg")) > > Regards, > > Diego > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/symfony-devs?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
