I would like to post my experience/suggestions about the form validation layer, as I have heard the developers are going to refactor that complex layer.
1. First of all - I think this layer lacks "modify" functionality in custom validator classes. These classes have the following method definition: public function execute (&$value, &$error); ... which is confusing a little, because one can change the $error, but changing the $value has no effect. Another issue - I cannot know the field name being checked. There are workarounds of course, but anyway... 2. The next problem is what I have already described here: http://trac.symfony-project.com/trac/ticket/1967. Sometimes I need to launch validation even on empty fields. I have a patch for this, but in standard symfony there is no way how one can force validation for empty fields. 3. I use include_custom and I often need to drop empty fields from the request parameter holder, because they get converted to NON-NULLS, which is wrong for me when using SomePeer::fromArray() method. Would be nice, if one could do the following in the validate/someAction.yml: fields: some_field: drop_empty: true # drops the request parameter if === "" sfStringValidator: # just an example . . . Thanks, Comments are welcome, Andrejs Verza --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
