Changeset 5988
- Timestamp:
- 02/01/12 21:54:48 (4 months ago)
- Location:
- trunk/core/viewhelper/form
- Files:
-
- 6 edited
-
form.php (modified) (2 diffs)
-
formelement.php (modified) (2 diffs)
-
validators/maxlength.php (modified) (1 diff)
-
validators/maxvalue.php (modified) (3 diffs)
-
validators/minlength.php (modified) (1 diff)
-
validators/minvalue.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/viewhelper/form/form.php
r5936 r5988 1633 1633 * 1634 1634 * The method iterates (loops over) all formelement objects and calls the validation on each object. 1635 * In other words: a form is valid, if all formelement are valid. Su prise, suprise.1635 * In other words: a form is valid, if all formelement are valid. Surprise, surprise. 1636 1636 * 1637 1637 * @return boolean Returns true if form validates, false if validation fails, because errors exist. … … 1647 1647 1648 1648 # and transfer errormessages from formelement to form errormessages stack 1649 #$this->addErrorMessage($formelement->getErrorMessages());1649 $this->addErrorMessage($formelement->getErrorMessages()); 1650 1650 } 1651 1651 } -
trunk/core/viewhelper/form/formelement.php
r5949 r5988 76 76 77 77 /** 78 * Error status (flag variable) of the formelement. 79 * 80 * @var boolean 81 */ 82 protected $error = false; 83 84 /** 78 85 * Set id of this form. 79 86 * … … 618 625 } 619 626 620 # no rules / validators627 # return early, if we have a value, but no rules / validators 621 628 if(null === $this->validators) 622 629 { -
trunk/core/viewhelper/form/validators/maxlength.php
r5985 r5988 89 89 protected function processValidationLogic($value) 90 90 { 91 if (self::getStringLength($value) > =$this->getMaxlength())91 if (self::getStringLength($value) > $this->getMaxlength()) 92 92 { 93 93 return false; -
trunk/core/viewhelper/form/validators/maxvalue.php
r5986 r5988 43 43 public $maxvalue; 44 44 45 public function getMax value()45 public function getMaxValue() 46 46 { 47 47 return $this->maxvalue; … … 53 53 * @param integer $maxvalue 54 54 */ 55 public function setMax value($maxvalue)55 public function setMaxValue($maxvalue) 56 56 { 57 57 $this->maxvalue = (int) $maxvalue; … … 60 60 public function getErrorMessage() 61 61 { 62 return _('The value exceeds the maxvalue of ' . $this->getMax value() . ' chars.');62 return _('The value exceeds the maxvalue of ' . $this->getMaxValue() . ' chars.'); 63 63 } 64 64 65 65 protected function processValidationLogic($value) 66 66 { 67 if($value > $this->getMax value())67 if($value > $this->getMaxValue()) 68 68 { 69 69 return false; -
trunk/core/viewhelper/form/validators/minlength.php
r5985 r5988 89 89 protected function processValidationLogic($value) 90 90 { 91 if (self::getStringLength($value) < =$this->getMinlength())91 if (self::getStringLength($value) < $this->getMinlength()) 92 92 { 93 93 return false; -
trunk/core/viewhelper/form/validators/minvalue.php
r5986 r5988 43 43 public $minvalue; 44 44 45 public function getMin value()45 public function getMinValue() 46 46 { 47 47 return $this->minvalue; … … 53 53 * @param integer $minvalue 54 54 */ 55 public function setMin value($minvalue)55 public function setMinValue($minvalue) 56 56 { 57 57 $this->minvalue = (int) $minvalue; … … 60 60 public function getErrorMessage() 61 61 { 62 return _('The value deceeds (is less than) the minvalue of ' . $this->getMin value() . ' chars.');62 return _('The value deceeds (is less than) the minvalue of ' . $this->getMinValue() . ' chars.'); 63 63 } 64 64 65 65 protected function processValidationLogic($value) 66 66 { 67 if($value < = $this->getMinvalue())67 if($value < $this->getMinValue()) 68 68 { 69 69 return false;
Note: See TracChangeset
for help on using the changeset viewer.
