NAME

SparkX::Form::Field::Validator::MaxLength - Validates a variable does not exceed a given size

VERSION

version 0.2102

DESCRIPTION

A maximum length enforcement mix-in. Adds two fields plus action. Makes sure that value is at most max_length characters long.

ACCESSORS

max_length => Int

The maximum length you desire. Required. In a subclass, you can:

has '+max_length' => (required => 0,default => sub { $HOW_LONG });

if you want to have it optional with a default

errmsg_too_long => Str

Error message to be shown if value is too long.

AUTHOR

James Laver L<http://jameslaver.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2009 by James Laver <sprintf qw(%s@%s.%s cpan jameslaver com)>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.