I agree that it would be magnific if we could constrain method parameters. But to automate this would require AOP, which is not supported by PHP. So the only other reasonable approach IMO is to validate data that is already written into the object, by validating property/getter values.
Pulling the validation definition completely out of the objects and into the form would be a step backwards now. @Lukas: Your use cases can be solved differently. Aside from the object also the form field is validated. You could f.i. constrain getDisplayedData(), which contains exactly what the user has entered into the field. Actually, extending PasswordField for common required functionality (min length, min number of letters/numbers/special chars etc.) is on my TODO list to solve this problem. Thank you for creating the tickets. I will look at them. Bernhard -- Software Architect & Engineer Blog: http://webmozarts.com Twitter: http://twitter.com/webmozart -- 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
