Beefy Boxes and Bandwidth Generously Provided by pair Networks Ovid
P is for Practical
 
PerlMonks  

Re: ?Homework alert! Re: validating string length with a regular expression

by buckaduck (Chaplain)
on Mar 18, 2002 at 13:16 UTC ( [id://152544]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to •Homework alert! Re: validating string length with a regular expression
in thread validating string length with a regular expression

<wild speculation>

Although it's not my question, I can imagine a situation where someone is validating a set of variables which contain user-supplied data. A simple design for validating them might involve a hash table which correlates each data type to an "allowable" regex pattern.

Not that there aren't ways around this (perhaps using subroutines instead of regexes). But I'll admit that I've done it before, cramming a lot of data validation into a single regex for this purpose.

</wild speculation>

Update: I'm good. But I'm slow. Ah, well...

buckaduck

Replies are listed 'Best First'.
Data::FormValidator [was Re: ?Homework alert! Re: validating string length with a regular expression]
by jehuni (Pilgrim) on Mar 18, 2002 at 13:26 UTC

    Bull's eye!

    Anyway, this is my first experience with Data::FormValidator (formerly HTML::FormValidator, I believe). It seems to do what I want, but if anyone has any other recommendations for a generic sort of input validation module, please share. My use of Data::FormValidator is based partly on a Super Search of perlmonks, so I'd love to hear of any other possibilities that I may have overlooked.

    -jehuni

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://152544]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.