On 12.12.2010, at 15:46, Lukas Kahwe Smith wrote:
> Are all of these version equivalent? Are 1) and 2) just syntax sugar?
of course the coolest syntax would be:
/**
* @validation:Validation({
* NotBlank(),
* MinLength(limit=2),
* MaxLength(limit=100)
Hi Bernhard,
Just trying to get an understanding of the annotation syntax to use for the
validation annotations:
1) See this example file in DoctrineUserBundle:
https://github.com/knplabs/DoctrineUserBundle/blob/symfony2Security/Model/User.php
/**
* @validation:Validation({
*
I agree with Jeremy here. I seriously doubt the people designing the
JSR didn't think about this problem, but I have too little experience
working with constraints to find a good solution here. I will do some
research on how people in the Java world solve this, but using
validation groups sounds li
I missed the IRC conversation, but I think that validation groups are the
answer here. I'm not entirely familiar with JSR-303, but from the limited
Java constraint syntax I've worked with (e.g. "@NotNull") they are
first-class citizens in the code and seem to stack constraints as classes
are exten
On 30.11.2010, at 10:15, Lukas Kahwe Smith wrote:
> Hi,
>
> I just realized that there is no way to get rid of validation rules defined
> in a parent class when extending. Now I can think of a couple of approaches
> to handle this:
4) On IRC Thomas suggested that validation groups could pote
Hi,
I just realized that there is no way to get rid of validation rules defined in
a parent class when extending. Now I can think of a couple of approaches to
handle this:
1) all annotations are inherited by default. redefining a property in a child
class, clears all parent annotations for tha
On 10/7/10 5:26 PM, Bernhard Schussek wrote:
Should we then maybe rename the Validation constraint to Set? (or
something the like)
Then it would more logically explain its usage.
/**
* @validation:NotNull
* @validation:Set({
* @validation:DateTime,
* @validation:Dat
Thanks Jordi,
good to know that this is coming.
Pablo
On Thu, Oct 7, 2010 at 11:58 AM, Jordi Boggiano wrote:
> On 07.10.2010 17:56, Pablo Godel wrote:
> > Will this also affect the ODM annotations ?
>
> Yup, it's already been committed:
>
>
> http://github.com/fabpot/symfony/commit/8fbf19694f2
On 07.10.2010 17:56, Pablo Godel wrote:
> Will this also affect the ODM annotations ?
Yup, it's already been committed:
http://github.com/fabpot/symfony/commit/8fbf19694f253e8bacdd677362ee58967506bbb3
Cheers
--
Jordi Boggiano
@seldaek :: http://seld.be/
--
If you want to report a vulnerabili
Jon,
Will this also affect the ODM annotations ?
Pablo
On Sat, Oct 2, 2010 at 9:34 AM, Fabien Potencier <
fabien.potenc...@symfony-project.com> wrote:
> Hi all,
>
> I have just changed the way we use annotations for validation.
>
> To avoid naming collision, we have decided to use aliases for a
On 07.10.2010 17:26, Bernhard Schussek wrote:
> Should we then maybe rename the Validation constraint to Set? (or
> something the like)
>
> Then it would more logically explain its usage.
>
>/**
> * @validation:NotNull
> * @validation:Set({
> * @validation:DateTime,
> * @v
Should we then maybe rename the Validation constraint to Set? (or
something the like)
Then it would more logically explain its usage.
/**
* @validation:NotNull
* @validation:Set({
* @validation:DateTime,
* @validation:DateTime
* })
*/
Cheers,
Bernhard
--
If you w
Hi all,
I have just changed the way we use annotations for validation.
To avoid naming collision, we have decided to use aliases for all
annotations used in Symfony2.
So, as of today, instead of using this:
/**
* @Validation({...@datetime()})
*/
You need to use this:
/**
13 matches
Mail list logo