Symfony: Pre filtering submitted values before/after validation

Posted by Rob on Stack Overflow See other posts from Stack Overflow or by Rob
Published on 2010-06-02T23:02:46Z Indexed on 2010/06/02 23:04 UTC
Read the original article Hit count: 202

Filed under:
|
|
|
|

Hi All

I've been scouring the net and i have found nothing!

I am using symfonys form framework to build a simple 'Create' form. Validation is fine. However i'd like to pre-filter my submitted values, so adding ucfirst, strtoupper, and the like.

I'm not sure if im missing something crucial here, but the way i see it is the only way to do this would be to create my own custom validators and utilizing the doClean method, which seems daft since i'd have hundreds of validators for each php function!

Hope you guys can help, i've been crawling through source code, api's, numerous books and blogs and i haven't found a thing :( Either it's impossible, or it's really easy, i hope its the latter!

© Stack Overflow or respective owner

Related posts about validation

Related posts about form