Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Bloody excellent, anon.

I never would have figured to do that clever trick. I tested it and it worked like a charm.

However I changed a few things from your suggested code to get exactly what I needed. I'm including them here in case others might want to use this ingenious tactic.

I reverted to my original regexp constraint for the userid_untaint constraint because I wanted users to know that they had entered invalid characters and didn't want the password silently changed, because then they wouldn't be able to log back in using their original password.

As well, I changed $q->param( userid_untaint => 'dummy junk' ); to $q->param( userid_untaint => $q->param('userid')); and took out the dependancy. Then I added both userid and userid_untaint to the required list. This way, the userid_untaint (I must change the name to something like userid2 or some such) becomes like an additional variable to be tested.

I'll ++ you tomorrow when I have some votes. Its a shame you are anon, because your excellent idea should be recognized.

Why can't you untaint and check your database at the same time?

I wanted a clear separation between each test to make it easier to send messages to the user and to make my code more maintainable. I included only a snippet of code in my OP, however, there are many more tests, including passord confirmation, email validation, etc. I am trying to take full advantage of the power of the D::FV module.

Many thanks,

Anne


In reply to Re: Re: Mulitple constraints for Data::FormValidator by Anneq
in thread Mulitple constraints for Data::FormValidator by Anneq

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others scrutinizing the Monastery: (4)
    As of 2025-06-23 18:02 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?
      erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.