HTML::FormFu::Constraint::Word - Single Word Constraint


HTML-FormFu documentation Contained in the HTML-FormFu distribution.

Index


Code Index:

NAME

Top

HTML::FormFu::Constraint::Word - Single Word Constraint

DESCRIPTION

Top

Ensure the input is a single word. Which characters are considered "word characters" will depend on the current locale.

SEE ALSO

Top

Is a sub-class of, and inherits methods from HTML::FormFu::Constraint::Regex, HTML::FormFu::Constraint

HTML::FormFu

AUTHOR

Top

Carl Franks cfranks@cpan.org

LICENSE

Top

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


HTML-FormFu documentation Contained in the HTML-FormFu distribution.

package HTML::FormFu::Constraint::Word;

use Moose;
extends 'HTML::FormFu::Constraint::Regex';

sub regex {
    return qr/^\w*\z/;
}

__PACKAGE__->meta->make_immutable;

1;

__END__