1HTML::FormFu::Element::UUsReLr(3C)ontributed Perl DocumeHnTtMaLt:i:oFnormFu::Element::URL(3)
2
3
4

NAME

6       HTML::FormFu::Element::URL - HTML5 URL form field
7

VERSION

9       version 2.07
10

SYNOPSIS

12           my $element = $form->element( URL => 'foo' );
13
14           # no need to add a separate constraint
15

DESCRIPTION

17       HTML5 URL form field which provides native client-side validation in
18       modern browsers.
19
20       Creates an input field with "<type="url"">.
21
22       Also sets the "pattern" attribute to restrict the client-side
23       validation to only our desired schemes (http and/or https).
24
25       This element automatically adds a Regex constraint, so you don't have
26       to.
27
28       If neither "http_only" or "https_only" are set, the constraint allows
29       any HTTP or HTTPS url.
30

METHODS

32   http_only
33   https_only
34   message
35       Arguments: $string
36
37       Set the error message on the Regex constraint which is automatically
38       added.
39
40   message_xml
41       Arguments: $string
42
43       If you don't want your error message to be XML-escaped, use the
44       "message_xml" method instead of "message".
45
46   message_loc
47       Arguments: $localization_key
48
49       Set the error message using a L10N key.
50

SEE ALSO

52       Is a sub-class of, and inherits methods from
53       HTML::FormFu::Role::Element::Input, HTML::FormFu::Role::Element::Field,
54       HTML::FormFu::Element.
55
56       HTML::FormFu
57

AUTHOR

59       Carl Franks, "cfranks@cpan.org"
60

LICENSE

62       This library is free software, you can redistribute it and/or modify it
63       under the same terms as Perl itself.
64

AUTHOR

66       Carl Franks <cpan@fireartist.com>
67
69       This software is copyright (c) 2018 by Carl Franks.
70
71       This is free software; you can redistribute it and/or modify it under
72       the same terms as the Perl 5 programming language system itself.
73
74
75
76perl v5.34.0                      2022-01-21     HTML::FormFu::Element::URL(3)
Impressum