Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Data::FormValidator::Constraints::DateTime 1.11

    Download button

    No screenshots available
    Downloads: 372  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.0/5)
    2 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Michael Peters | More programs
    Perl Artistic License / FREE
    December 14th, 2007, 07:13 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Data::FormValidator::Constraints::DateTime description

    A package which contains D::FV constraints for dates and times

    Data::FormValidator::Constraints::DateTime package contains D::FV constraints for dates and times.

    This package provides constraint routines for Data::FormValidator for dealing with dates and times. It provides an easy mechanism for validating dates of any format (using strptime(3)) and transforming those dates (as long as you 'untaint' the fields) into valid DateTime objects, or into strings that would be properly formatted for various database engines.

    ABSTRACT

    use Data::FormValidator;
    use Data::FormValidator::Constraints::DateTime qw(:all);

    # create our profile
    my $profile = {
    required => [qw(my_date)],
    constraint_methods => {
    my_date => to_datetime('%D'), # in the format MM/DD/YYYY
    },
    untaint_all_constraints => 1,
    };

    # validate 'my_date'
    my $results = Data::FormValidator->check($my_input, $profile);

    if( $results->success ) {
    # if we got here then $results->valid('my_date')
    # is a valid DateTime object
    my $datetime = $results->valid('my_date');
    .
    .
    }


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    D::FV constraints | form validator | Perl module | D::FV | date | time

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM