Apache2-WebApp-Plugin-Validate

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl module Apache2::WebApp::Plugin::Validate

0.08
    - Migrated project SCM and code repository to Google Project hosting.
    - Updated POD and README artistic license URL in COPYRIGHT clause.
    - Changed each module version so that I can verify that the PAUSE packager/uploader script works as expected.
    - Updated license field in META.yml to fix 'License Unknown' issue on CPAN
    - Updated PREREQ_PM module versions in Makefile.PL
    - Updated module versions in META.yml requires field.

README  view on Meta::CPAN

    Is the date in the future? (YYYY-MM-DD)

      my $result = $c->plugin('Validate')->date_is_future($date);

  date_is_past
    Is the date in the past? (YYYY-MM-DD)

      my $result = $c->plugin('Validate')->date_is_past($date);

  domain
    Check the domain name format; verify the domain status using a DNS
    query.

      my $result = $c->plugin('Validate')->domain($name);

  email
    Check the e-mail address format; verify the domain status using a DNS
    query.

      my $result = $c->plugin('Validate')->email( $address, $mx_check );

  integer
    Check for a integer.

      my $result = $c->plugin('Validate')->integer($value);

  html

lib/Apache2/WebApp/Plugin/Validate.pm  view on Meta::CPAN

        Date_to_Days( $year2, $month2, $day2 ))
    {
        return 1;
    }
    return 0;
}

#----------------------------------------------------------------------------+
# domain($name)
#
# Check the domain name format; verify the domain status using a DNS query.

sub domain {
    my ( $self, $name )
      = validate_pos( @_,
          { type => OBJECT },
          { type => SCALAR }
          );

    my $dns = new Net::DNS::Check(
        domain => $name,
      );

    return ($dns->check_status() ? 1 : 0);
}

#----------------------------------------------------------------------------+
# email($address)
#
# Check the e-mail address format; verify the domain status using a DNS query.

sub email {
    my ( $self, $address, $mx )
      = validate_pos( @_,
          { type => OBJECT },
          { type => SCALAR },
          { type => SCALAR, optional => 1 }
          );

    my $valid = Email::Valid->address(

lib/Apache2/WebApp/Plugin/Validate.pm  view on Meta::CPAN

  my $result = $c->plugin('Validate')->date_is_future($date);

=head2 date_is_past

Is the date in the past? (YYYY-MM-DD)

  my $result = $c->plugin('Validate')->date_is_past($date);

=head2 domain

Check the domain name format; verify the domain status using a DNS query.

  my $result = $c->plugin('Validate')->domain($name);

=head2 email

Check the e-mail address format; verify the domain status using a DNS query.

  my $result = $c->plugin('Validate')->email( $address, $mx_check );

=head2 integer

Check for a integer.

  my $result = $c->plugin('Validate')->integer($value);

=head2 html



( run in 0.459 second using v1.01-cache-2.11-cpan-73692580452 )