Form::Toolkit::FieldRole::MinMax - A Role that add a min and a max value to a field (for Numeric fields of course).
Chainable setter for v_min()
Additionaly, use that to set the exclusion flag if you want this minimum value to be exclusive.
Usage:
## Set inclusive min [0.. $this->set_min(0); $this->set_min(0, undef); ## Set exclusive min ]0.. $this->set_min(0 ,'exclude');
Chainable setter for v_max(); Works the same way as set_min.
## Set inclusive max .. 10] $this->set_max(10); $this->set_max(10, undef); ## Set exclusive max .. 10[ $this->set_max(10, 'exclusive');
To install Form::Toolkit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Form::Toolkit
CPAN shell
perl -MCPAN -e shell install Form::Toolkit
For more information on module installation, please visit the detailed CPAN module installation guide.