Hi!

> Please excuse the ignorance, but does this mean that you'd define some
> validation rules in your schema.*ml file?
Basically yes. You define all rules in the schema files and it doesn't
matter whether you save a record normally or through a form. It always
gets validated. If you save it normally, you get an exception thrown,
and if you save it through a form, the exceptions are caught and
displayed as error messages.

The huge benefit is that all rules are defined only once in the
schema. You don't need to redefine any validators when creating forms,
and you don't need to validate records manually before saving them.


Bernhard


On Fri, Aug 29, 2008 at 7:52 PM, Tom Haskins-Vaughan
<[EMAIL PROTECTED]> wrote:
>
> Please excuse the ignorance, but does this mean that you'd define some
> validation rules in your schema.*ml file? If so, I think that sounds
> like a good idea.
>
> Jonathan Wage wrote:
>> I think it would be nice to be able to control validation at the model
>> level and be able to inherit those rules to be used on the actions on
>> the frontend of the application. Currently I find myself duplicating
>> things at the model layer and symfony validation layer.
>>
>> - Jon
>>
>> On Fri, Aug 29, 2008 at 11:00 AM, Jacob Coby <[EMAIL PROTECTED]
>> <mailto:[EMAIL PROTECTED]>> wrote:
>>
>>
>>     All,
>>
>>     During today's #symfony-sprint, the topic of model-level validation
>>     similar to Django or RoR came up.  I'm curious to see what everyone's
>>     opinion is.  Is it worth pursuing in 1.3?
>>
>>     --
>>     Jacob Coby
>>     [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> Jonathan H. Wage
>> Open Source Software Developer & Evangelist
>> http://www.jwage.com
>>
>> >
>
> --
> Tom Haskins-Vaughan
> Temple Street Media: Design and Development for the Web
> [EMAIL PROTECTED] | www.templestreetmedia.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