perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allen haim <>
Subject Form Validation
Date Wed, 22 Jun 2005 21:06:12 GMT
Gerald, is it possible this is a bug:

I notice that your validation for the Number type uses this regex:


However, that fails on a value such as 9.516e-5, which is a valid float.

I believe you need to add a negative sign to the second character class:


This regex is still a little too lax, because it will allow malformed numbers




Also, I am successfully using the following rule:

$rules = [
        -key    => 'user_seq',
        -name   => 'User-inputted sequence',
        emptyok     => 1,
        -msg => 'blah blah blah',
        matches_regex       => "^\\s*(>.+\\n)?[\\s$NT]+\$",

Note that it's 'matches_regex', not 'matches_regex_js'. In the docs it says
that this shouldn't work on the client side, but it does.

What is the difference between perl regular expressions and javascript ones?



p.s. The SetupSession/GetSession stuff is working great -- I will have more
to say on that in a bit. 


slash is the only person who deserves a slash.  

-stephen handley

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message