Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 30.152.848 Times

CGI::Validate 2.000

  Date Added: January 04, 2010  |  Visits: 750


Report Broken Link
Printer Friendly Version

Product Homepage
Download (72 downloads)

CGI::Validate is an advanced CGI form parser and type validation. SYNOPSIS use CGI::Validate; # GetFormData() only use CGI::Validate qw(:standard); # Normal use use CGI::Validate qw(:subs); # Just functions use CGI::Validate qw(:vars); # Just exception vars ## If you dont want it to check that every requested ## element arrived you can use this. But I dont recommend it ## for most users. $CGI::Validate::Complete = 0; ## If you dont care that some fields in the form dont ## actually match what you asked for. -I dont recommend ## this unless you REALLY know what youre doing because this ## normally meens youve got typos in your HTML and we cant ## catch them if you set this. ## $CGI::Validate::IgnoreNonMatchingFields = 1; my $FieldOne = Default String; my $FieldTwo = 8; my $FieldThree = some default string; my @FieldFour = (); ## For multi-select field my @FieldFive = (); ## Ditto my $EmailAddress= ; ## Try... my $Query = GetFormData ( FieldOne=s => $FieldOne, ## Required string FieldTwo=i => $FieldTwo, ## Required int FieldThree => $FieldThree, ## Auto converted to the ":s" type FieldFour=s => @FieldFour, ## Multi-select field of strings FieldFive=f => @FieldFive, ## Multi-select field of floats Email=e => $EmailAddress, ## Must look like an email address ) or do { ## Catch... (wouldnt you just love a case statement here?) if (%Missing) { die "Missing form elements: " . join ( , keys %Missing); } elsif (%Invalid) { die "Invalid form elements: " . join ( , keys %Invalid); } elsif (%Blank) { die "Blank form elements: " . join ( , keys %Blank); } elsif (%InvalidType) { die "Invalid data types for fields: " . join ( , keys %InvalidType); } else { die "GetFormData() exception: $CGI::Validate::Error"; } }; ## If you only want to check the form data, but dont want to ## have CGI::Validate set anything use this. -You still have full ## access to the data via the normal B object that is returned. use CGI::Validate qw(CheckFormData); # not exported by default my $Query = CheckFormData ( FieldOne=s, FieldTwo=i, FieldThree, FieldFour, FieldFive, Email, ) or do { ... Same exceptions available as GetFormData above ... }; ## Need some of your own validation code to be used? Here is how you do it. addExtensions ( myType => sub { $_[0] =~ /test/ }, fooBar => &fooBar, i_modify_the_actual_data => sub { if ($_[0] =~ /test/) { ## data validation $_[0] = whatever; ## modify the data by alias return 1; } else { return 0; } }, ); my $Query = GetFormData ( foo=xmyType => $foo, bar=xfooBar => $bar, cat=xi_modify_the_actual_data => $cat, ); ## Builtin data type checks available are: s string # Any non-zero length value w word # Must have at least one w char i integer # Integer value f float # Float value e email # Must match m/^s*]+@[^@.<>]+(?:.[^@.<>]+)+>?s*$/ x extension # User extension type. See EXTENSIONS below. Basicly a blending of the CGI and Getopt::Long modules, and requires the CGI module to function. The basic concept of this module is to combine the best features of the CGI and Getopt::Long modules. The CGI module is great for parsing, building, and rebuilding forms, however it lacks any real error checking abilitys such as misspelled form input names, the data types received from them, missing values, etc. This however, is something that the Getopt::Long module is vary good at doing. So, basicly this module is a layer that collects the data using the CGI module and passes it to routines to do type validation and name consistency checks all in one clean try/catch style block. The syntax of GetFormData() is mostly the same as the GetOptions() of Getopt::Long, with a few exceptions (namely, the handling of exceptions) . See the VALUE TYPES section for detail of the available types, and the EXCEPTIONS section for exception handling options. If given without a type, fields are assumed to be type ":s" (optional string), which is normally correct. If successful, GetFormData() returns the CGI object that it used to parse the data incase you want to use it for anything else, and undef otherwise. If you only want to do value type and name validation, use CheckFormData() instead with a field=type list. -See the SYNOPSIS for an example..

Requirements: No special requirements
Platforms: Linux
Keyword: Cgi Form Cgivalidate Data Dont Fieldfive Fieldfour Fieldthree Fieldtwo Form Getformdata Module Type Want To
Users rating: 0/10

License: Freeware Size: 10.24 KB
Medical  -  PT Clinic Intake 2.0.7
The purpose of this free app is to help physical therapists collect important data that enhances patient therapy. Target users: Physical therapists who want to provide the best therapy to patients. The PT Clinic Intake app is...
4.8 MB  
Entertainment  -  Assassin's Creed Story
This is a app form a big fan of assassin's creed main series. If you want to know more about assassin creed download itt Requirements: Windows Phone 8.1, Windows Phone 8
4 MB  
Productivity  -  Sample Browser
With the Windows Phone Sample Browser and a data connection, MSDN code samples are always at your fingertips. Want to learn from samples while commuting? Absolutely! At a conference and someone asks you for ideas? You can refer them to a sample in...
9 MB  
Entertainment  -  SMSFunPics
SMSFunPics you allows you send text messages to your friend in form of images. Don't send those boring text messages any more. Want to impress you friends with your ability? Try it. This kind of ASCII texting will only work with other...
1024 KB  
Web Browser Tools  -  Form Saver 0.7.0
Form Saver enables you to saves form field data as autofill-bookmarklets. Saves form field data as autofill-bookmarklets. Works with inputs, checkboxes, radio groups, textareas, and selects. As always, feel free to email me with suggestions or...
64.51 KB  
Libraries  -  CGI::kSession 0.5.3
CGI::kSession is a sessions manager for CGI. This module can be used anywhere you need sessions. As a session management module, it uses files with a configurable lifetime to handle your session data. For those of you familiar with PHP, you will...
4.1 KB  
Network & Internet  -  mod_form 1.0
mod_form is a utility to decode data submitted from Web forms. It deals with both GET and POST methods where the data are encoded using the default content type application/x-www-form-urlencoded. mod_form does not decode multipart/form-data...
9.22 KB  
Communication Tools  -  J-QAM 3.0
Use any simple radio transmitter to send Audio/Video or any other form of data via the soundcard. Rates up to 400kb/s possible. With two transmitters, 2way communication is possible. Uses quadrature amplitude modulation scheme (QAM). Robustness is...
1.96 MB  
Form Processors  -  AWT Form2Mail 1.0
AWT Form2Mail is an easy-to-use and highly configurable CGI program that sends the results of a submitted form as an email message. Also it posts useful info like ip number and remote host. After all it thanks user by a specified html page. AWT...
10 KB  
Programming  -  MirrorJNDI 1.0
MirrorJNDI is an open source Java Naming and Directory Interface (JNDI) service provider for accessing arbitrary Java objects in a hierarchical namespace.MirrorJNDI can store all it's data in XML or binary serialized form. It allows to create...
71 KB  
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.12.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB