hi,

> Why not make the models responsible for data validation? I've never understood the desire to require the use of form objects.


at least from my point of view, I would never want to allow the model do the validation. just because of the simple fact, that I might have different validation criterias for different user-groups but still for the same model.

very simple example: an editor can add HTML to a text-field, a simple user not.

I do have anyway two form-classes for this fact (one might extend the other one), because the editor is using more fields for the same model too.

just my2Cents


PS: for the main-topic of that thread:
usually we extend our form-classes by setting the form.labels with a i18 identifier, which again, is translated in a language file:

$widget_schema->setLabel('username', __('form.username', array(), 'sf_guard') );


and the helper is already loaded in the app-configuration.class
public function configure()
{
  ProjectConfiguration::getActive()->loadHelpers(array('I18N','Url'));
}

--
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

Reply via email to