cokker wrote: afaik there exists an option for trim. Perhaps have a look at the source or search the forum.
I always search the forum and the source before asking anything.
The only options added by sfValidatorString are min_length, max_length, and empty_value. I may just extend sfValidatorString to include this option.
On further reflection, a validator isn't really the ideal place for this kind of uniform modification--it's not validation, but a form of pre-processing--but adding it as an option to sfValidatorString gives the convenience of not having to modify the values myself prior to handing them off for validation.
I've yet to look into Symfony 2.0, so I can't speak to the form-processing features it is set to contain, but this points to the potential utility of a framework for processing form values prior to validation. Other possible string pre-processing might include converting everything to lowercase or uppercase, stripping various character classes ([non]alphanumeric, punctuation, etc.) or even regular expression matches, character escaping...