GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HTML::Shakan::Field(3) User Contributed Perl Documentation HTML::Shakan::Field(3)

HTML::Shakan::Field - base class for field object

This is a base class for filed object.

the 'id' attribute for the HTML elements.
the 'name' attribute for the HTML elements.
the 'value' attribute for the HTML elements.
This is parameter filters in arrayref.

For example, following field removes white space from parameter value in head and end.

    TextField(
        name     => 'f',
        required => 1,
        filters  => [qw'WhiteSpace']
    ),
    
type of widget.
hashref about the miscellaneous attributes.
label for this field.
class attribute for this field's label.
is this field's value required?
    TextField(
        name => 'id',
        custom_validation => sub {
            my ($form, $field) = @_;
            if (is_reserved_id($form->param($field->name))) {
                $form->set_error($field->name() => 'reserved');
            }
        }
    )
    

You can register custom validation callback.

The callback function takes two arguments.

$form
This is a instance of HTML::Shakan. You can take query parameter value by this object.
$field
The field object itself.
constraints for FormValidator::Lite.

tokuhirom

2017-04-25 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.