コード例 #1
0
ファイル: items.php プロジェクト: cepharum/txf
 public function validate($input, $property, model_editor $editor)
 {
     parent::validate($input, $property, $editor);
     $items = preg_split('/[' . preg_quote($this->separator) . ']/', $input);
     if ($this->minCount > 0 && $this->minCount > count($items)) {
         throw new \InvalidArgumentException(\de\toxa\txf\_L('Provide additional information here!'));
     }
     if ($this->maxCount > 0 && $this->maxCount < count($items)) {
         throw new \InvalidArgumentException(\de\toxa\txf\_L('Provide less information here!'));
     }
     return true;
 }
コード例 #2
0
ファイル: decimal.php プロジェクト: cepharum/txf
 public function validate($input, $property, model_editor $editor)
 {
     return parent::validate(self::internationalFormat($input), $property, $editor);
 }