Esempio n. 1
0
 public function between($parsedRule, $attribute, $type)
 {
     $message = Helper::getValidationMessage($attribute, $parsedRule['name'], ['min' => $parsedRule['parameters'][0], 'max' => $parsedRule['parameters'][1]], $type);
     switch ($type) {
         case 'numeric':
             return ['data-msg-range' => $message];
             break;
         default:
             return ['data-msg-minlength' => $message, 'data-msg-maxlength' => $message];
             break;
     }
 }
Esempio n. 2
0
 /**
  * Gets default error message
  * @return string
  */
 protected function getDefaultErrorMessage($laravelRule, $attribute)
 {
     // getting user friendly validation message
     $message = Helper::getValidationMessage($attribute, $laravelRule);
     return ['data-msg-' . $laravelRule => $message];
 }