From owner-freebsd-ports Sun Oct 28 10:40:19 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1616637B406 for ; Sun, 28 Oct 2001 10:40:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9SIe2O30909; Sun, 28 Oct 2001 10:40:02 -0800 (PST) (envelope-from gnats) Received: from pris.polaris.ca (pris.polaris.ca [199.247.156.218]) by hub.freebsd.org (Postfix) with SMTP id EBD1637B406 for ; Sun, 28 Oct 2001 10:30:12 -0800 (PST) Received: (qmail 40682 invoked by uid 85); 28 Oct 2001 18:31:30 -0000 Message-Id: <20011028183128.40676.qmail@pris.polaris.ca> Date: 28 Oct 2001 18:31:28 -0000 From: Seamus Venasse Reply-To: Seamus Venasse To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/31561: New port: Validates user input Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 31561 >Category: ports >Synopsis: New port: Validates user input >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Oct 28 10:40:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Seamus Venasse >Release: FreeBSD 4.3-STABLE i386 >Organization: Polaris Computing >Environment: System: FreeBSD pris 4.3-STABLE FreeBSD 4.3-STABLE #3: Tue Sep 4 01:09:13 PDT 2001 root@kaiser-old.polaris.ca:/usr/obj/usr/src/sys/NEXUS7 i386 >Description: Data::FormValidator's main aim is to make the tedious coding of input validation expressible in a simple format and to let the programmer focus on more interesting tasks. >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # p5-Data-FormValidator # p5-Data-FormValidator/pkg-plist # p5-Data-FormValidator/pkg-descr # p5-Data-FormValidator/pkg-comment # p5-Data-FormValidator/distinfo # p5-Data-FormValidator/Makefile # echo c - p5-Data-FormValidator mkdir -p p5-Data-FormValidator > /dev/null 2>&1 echo x - p5-Data-FormValidator/pkg-plist sed 's/^X//' >p5-Data-FormValidator/pkg-plist << 'END-of-p5-Data-FormValidator/pkg-plist' Xlib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Data/FormValidator/.packlist Xlib/perl5/site_perl/%%PERL_VER%%/Data/FormValidator.pm X@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Data/FormValidator X@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Data 2>/dev/null || true X@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/Data 2>/dev/null || true END-of-p5-Data-FormValidator/pkg-plist echo x - p5-Data-FormValidator/pkg-descr sed 's/^X//' >p5-Data-FormValidator/pkg-descr << 'END-of-p5-Data-FormValidator/pkg-descr' XData::FormValidator's main aim is to make the tedious coding of input Xvalidation expressible in a simple format and to let the programmer focus Xon more interesting tasks. X XWhen you are coding a web application one of the most tedious though Xcrucial tasks is to validate user's input (usually submitted by way of Xan HTML form). You have to check that each required fields is present Xand that some fields have valid data. (Does the phone input looks like a Xphone number? Is that a plausible email address? Is the YY state Xvalid? etc.) For a simple form, this is not really a problem but as Xforms get more complex and you code more of them this task becames Xreally boring and tedious. X XData::FormValidator lets you define profiles which declare the Xrequired fields and their format. When you are ready to validate the Xuser's input, you tell Data::FormValidator the profile to apply to the Xuser data and you get the valid fields, the name of the fields which Xare missing. An array is returned listing which fields are valid, Xmissing, invalid and unknown in this profile. X XYou are then free to use this information to build a nice display to Xthe user telling which fields that he forgot to fill. X XSeamus Venasse END-of-p5-Data-FormValidator/pkg-descr echo x - p5-Data-FormValidator/pkg-comment sed 's/^X//' >p5-Data-FormValidator/pkg-comment << 'END-of-p5-Data-FormValidator/pkg-comment' XValidates user input (usually from an HTML form) based END-of-p5-Data-FormValidator/pkg-comment echo x - p5-Data-FormValidator/distinfo sed 's/^X//' >p5-Data-FormValidator/distinfo << 'END-of-p5-Data-FormValidator/distinfo' XMD5 (Data-FormValidator-1.6.tar.gz) = f4fe48339026be5e7e01351397132fbb END-of-p5-Data-FormValidator/distinfo echo x - p5-Data-FormValidator/Makefile sed 's/^X//' >p5-Data-FormValidator/Makefile << 'END-of-p5-Data-FormValidator/Makefile' X# New ports collection makefile for: Data::FormValidator X# Date created: 27 Oct 2001 X# Whom: Seamus Venasse X# X# $FreeBSD: $ X# X XPORTNAME= Data-FormValidator XPORTVERSION= 1.6 XCATEGORIES= textproc perl5 XMASTER_SITES= ${MASTER_SITE_PERL_CPAN} XMASTER_SITE_SUBDIR= Data XPKGNAMEPREFIX= p5- X XMAINTAINER= svenasse@polaris.ca X XPERL_CONFIGURE= yes X XMAN3= Data::FormValidator.3 XMANPREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION} X X.include END-of-p5-Data-FormValidator/Makefile exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message