Commit d420d1c0 by Taylor Otwell

added language support for characters and kilobytes in validator library.

parent c1ca97d9
......@@ -2,6 +2,12 @@
return array(
/*
|--------------------------------------------------------------------------
| Validation Error Messages
|--------------------------------------------------------------------------
*/
"accepted" => "The :attribute must be accepted.",
"active_url" => "The :attribute does not exist.",
"alpha" => "The :attribute may only contain letters.",
......@@ -23,4 +29,14 @@ return array(
"unique" => "The :attribute has already been taken.",
"url" => "The :attribute format is invalid.",
/*
|--------------------------------------------------------------------------
| The following words are appended to the "size" messages when applicable,
| such as when validating string lengths or the size of file uploads.
|--------------------------------------------------------------------------
*/
"characters" => "characters",
"kilobytes" => "kilobytes",
);
\ No newline at end of file
......@@ -431,7 +431,9 @@ class Validator {
// the default error message appropriately.
if (in_array($rule, $this->size_rules) and ! is_numeric($this->attributes[$attribute]))
{
return (array_key_exists($attribute, $_FILES)) ? rtrim($message, '.').' kilobytes.' : rtrim($message, '.').' characters.';
return (array_key_exists($attribute, $_FILES))
? rtrim($message, '.').' '.Lang::line('validation.kilobytes')->get().'.'
: rtrim($message, '.').' '.Lang::line('validation.characters')->get().'.';
}
return $message;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment