hesco has asked for the wisdom of the Perl Monks concerning the following question:

I'm building a CGI::App application using CGI::FormBuilder. The built in data validation methods lack something to clean input for a text box, like this one I'm now typing in, which I need to only accept a plain text document. I'm seeking some existing code that will clean out the data of anything which looks like executable code, or anything that could possibly escape out of the sql / perl / latex processing that this input will be subject to down the road.

I'm hoping to find some model RE's I could adapt to this purpose, without having to start completely from scratch.

Any ideas?

-- Hugh

  • Comment on Seeking Form Validation RE's for text field

Replies are listed 'Best First'.
Re: Seeking Form Validation RE's for text field
by Melly (Chaplain) on Mar 21, 2006 at 19:59 UTC

    You might need to give more detail - if, for example, you're worried about sql statements, then it would be very hard to untaint text input.

    Tom Melly, tom@tomandlu.co.uk