6 Mar 19:40
Re: [FormBuilder] How to validate input not in list?
From: Kevin Jordan <kjordan3 <at> gmail.com>
Subject: Re: [FormBuilder] How to validate input not in list?
Newsgroups: gmane.comp.lang.perl.modules.formbuilder
Date: 2007-03-06 18:40:04 GMT
Subject: Re: [FormBuilder] How to validate input not in list?
Newsgroups: gmane.comp.lang.perl.modules.formbuilder
Date: 2007-03-06 18:40:04 GMT
Forgive my ignorance, but I need a little clarification on your response.
1) I'm not familiar with this at all. Is the unique DB constraint usage documented on the website?
2) So I would have something like this?
user_id => \&check_username_is_unique,
then just make that sub do whatever checking I want it to do. But what would it need to return? 1 or 0?
On 3/6/07, Nate Wiger <nwiger <at> gmail.com> wrote:
On 3/6/07, Kevin Jordan <kjordan3 <at> gmail.com> wrote:
> I need to be able to validate that the information the user puts in a field
> on my form is NOT in a long list that I have in a file.
> The reason behind this being I never want the same value used twice. For
> example, once a username is used, I don't want to allow someone to request
> it again.
>
> What is the best way to do this?
1) Add a unique DB constraint so bad data can't possibly get in
2) Write a \&check_username_is_unique callback function, and pass it
to validate for 'username'
-Nate
_______________________________________________ FBusers mailing list FBusers <at> formbuilder.org http://www.formbuilder.org/mailman/listinfo/fbusers
RSS Feed