Form::Factory::Feature::Control::MatchRegex - Match a control value against a regex
version 0.011
has_control five_char_palindrome => ( control => 'text', features => { match_regex => { regex => qr/(.)(.).\2\1/, message => 'the %s is not a palindrome', }, }, );
Checks that the control value matches a regular expression. Returns an error if it does not.
The regular expression to use.
Checks that the control does Form::Factory::Control::Role::ScalarValue.
Runs the regular expression against the current value of the control and reports an error if it does not match.
Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
<hanenkamp@cpan.org>
Copyright 2009 Qubling Software LLC.
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
To install Form::Factory, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Form::Factory
CPAN shell
perl -MCPAN -e shell install Form::Factory
For more information on module installation, please visit the detailed CPAN module installation guide.