Susan, my understanding is that if you call setLabel with __() for an
argument, you have to keep in mind that it will get called again by
the form framework, like it or not. I'm not certain whether that ever
becomes a problem in practice.

On Mon, Mar 15, 2010 at 2:24 PM, Susan Lau <[email protected]> wrote:
> 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
>



-- 
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

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