Roman F. > HTML-FormHandlerX-Field-URI-HTTP-v0.4 > HTML::FormHandlerX::Field::URI::HTTP

Download:
HTML-FormHandlerX-Field-URI-HTTP-v0.4.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.4.0   Source  

NAME ^

HTML::FormHandlerX::Field::URI::HTTP - an HTTP URI field

VERSION ^

version v0.4

SYNOPSIS ^

This field inherits from a Text field and is used to validate HTTP(S) URIs. Validated values are inflated into an URI object.

 has_field 'url' => (
     type    => 'URI::HTTP',
     scheme  => qr/https?/i,  ## default
     inflate => 1,            ## default
 );

METHODS ^

scheme

This method is used to set the type of regex used for validating the URI. By default both HTTP and HTTPS URIs are marked as valid. You can set this to only validate HTTP or HTTPS if you wish:

 scheme => qr/http/i,   # only validate HTTP URIs
 scheme => qr/https/i,  # only validate HTTPS URIs
 scheme => qr/https?/i, # validate both HTTP and HTTPS (default behaviour)

inflate

A boolean value that is checked whether or not the URL should be inflated into the URI object. Default is true.

SEE ALSO ^

HTML::FormHandler
HTML::FormHandler::Field::Text
Regexp::Common::URI::http
URI

AUTHOR ^

Roman F. <romanf@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2013 by Roman F..

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: