Пример #1
0
 protected function getDefaultErrorMessage($fieldName, $subRuleFlag = NULL, $threshold = NULL)
 {
     switch ($subRuleFlag) {
         case '.=':
             return "{$fieldName} must have {$threshold} digits after the decimal point.";
         case '.>':
         case '.>=':
             return "{$fieldName} must have {$threshold} or more digits after the decimal point.";
         default:
             return empty($subRuleFlag) ? "{$fieldName} must be an decimal." : parent::getDefaultErrorMessage($fieldName, $subRuleFlag, $threshold);
     }
 }
Пример #2
0
 protected function getDefaultErrorMessage($fieldName, $subRuleFlag = NULL, $threshold = NULL)
 {
     return empty($subRuleFlag) ? "{$fieldName} must be a whole number." : parent::getDefaultErrorMessage($fieldName, $subRuleFlag, $threshold);
 }