The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

HTML::Shakan::Fields - fields

DESCRIPTION

This module exports some functions, that generates a instance of HTML::Field::*.

If you want to know the details, please look the source :)

FUNCTIONS

TextField(name => 'foo')

create a instance of HTML::Shakan::Input.

This is same as HTML::Shakan::Input->new(name => 'foo', type => 'text', @_);

EmailField(name => 'email')

TextField() + EMAIL_LOOSE constraint.

URLField(name => 'url')

TextField() + HTTP_URL constraint

UIntField(name => 'i')

TextField() + UINT constraint

IntField(name => 'i')

TextField() + INT constraint

PasswordField(name => 'pw')

define <input type="password" /> field

FileField(name => 'file')

define <input type="file" /> field

ImageField(name => 'image')

FileField + FILE_MIME=image/* constraint

ChoiceField(name => 'interest', choices => [1 => 'moose', 2 => 'mouse', 3 => 'exporter'])

selector field.

DateField(name => 'birthdate')

date input field.

Duplication('mail' => EmailField(), EmailField())

both field contains same value?

AUTHORS

Tokuhiro Matsuno(tokuhirom)

SEE ALSO

HTML::Shakan

use Params::Validate ':all';