Jerome Eteve > Form-Toolkit-0.007 > Form::Toolkit::FieldRole::MinMax

Download:
Form-Toolkit-0.007.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.007   Source   Latest Release: Form-Toolkit-0.008

NAME ^

Form::Toolkit::FieldRole::MinMax - A Role that add a min and a max value to a field (for Numeric fields of course).

set_min

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');

set_max

Chainable setter for v_max(); Works the same way as set_min.

Usage:

   ## Set inclusive max .. 10]
   $this->set_max(10);
   $this->set_max(10, undef);

   ## Set exclusive max .. 10[
   $this->set_max(10, 'exclusive');
syntax highlighting: