[symfony-users] Re: Comparison of fields in validation

2011-05-04 Thread danielholmes
Hi Bernhard, Yea that sounds good, I'll do it tonight and send across the PR. The single properties option is a much better idea. I didn't realise you could put that assert:True on a method as Tim pointed out - very handy. I think there'll probably be a lot of new users who would be looking for/e

Re: [symfony-users] Re: Comparison of fields in validation

2011-05-04 Thread Bernhard Schussek
Hi Daniel, If you could prepare a PR with such constraints, I'd be happy to merge it. I would prefer if the constraint had only a single option "properties" which is also the default option. In case of LessThan, each property in that array should be less than all properties after that. So in simp

[symfony-users] Re: Comparison of fields in validation

2011-05-03 Thread danielholmes
Hi Greg, I think the Valid constraint is for a different purpose. See: http://symfony.com/doc/2.0/reference/constraints/Valid.html. I think you're right about a Comparison validation being common. One way it could work is with a series of CLASS_CONSTRAINT constraints (GreatherThan, LessThan, Less