refactoring.
This commit is contained in:
@@ -26,11 +26,6 @@ class Messages {
|
||||
*
|
||||
* Duplicate messages will not be added.
|
||||
*
|
||||
* <code>
|
||||
* // Add a message to the message collector
|
||||
* $messages->add('email', 'The e-mail address is invalid.');
|
||||
* </code>
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $message
|
||||
* @return void
|
||||
@@ -57,16 +52,6 @@ class Messages {
|
||||
/**
|
||||
* Get the first message for a given key.
|
||||
*
|
||||
* Optionally, a format may be specified for the returned message.
|
||||
*
|
||||
* <code>
|
||||
* // Get the first message for the e-mail attribute
|
||||
* echo $messages->first('email');
|
||||
*
|
||||
* // Get the first message for the e-mail attribute using a format
|
||||
* echo $messages->first('email', '<p>:message</p>');
|
||||
* </code>
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $format
|
||||
* @return string
|
||||
@@ -79,16 +64,6 @@ class Messages {
|
||||
/**
|
||||
* Get all of the messages for a key.
|
||||
*
|
||||
* Optionally, a format may be specified for the returned messages.
|
||||
*
|
||||
* <code>
|
||||
* // Get all of the messages for the e-mail attribute
|
||||
* $messages = $messages->get('email');
|
||||
*
|
||||
* // Get all of the messages for the e-mail attribute using a format
|
||||
* $messages = $messages->get('email', '<p>:message</p>');
|
||||
* </code>
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $format
|
||||
* @return array
|
||||
@@ -103,11 +78,6 @@ class Messages {
|
||||
/**
|
||||
* Get all of the messages for every key.
|
||||
*
|
||||
* <code>
|
||||
* // Get all of the error messages using a format
|
||||
* $messages = $messages->all('<p>:message</p>');
|
||||
* </code>
|
||||
*
|
||||
* @param string $format
|
||||
* @return array
|
||||
*/
|
||||
|
||||
@@ -457,7 +457,7 @@ class Validator {
|
||||
// the default error message for the appropriate units.
|
||||
if (in_array($rule, $this->size_rules) and ! $this->has_rule($attribute, $this->numeric_rules))
|
||||
{
|
||||
return (array_key_exists($attribute, Input::files()))
|
||||
return (array_key_exists($attribute, IoC::container()->resolve('laravel.input')->files()))
|
||||
? rtrim($message, '.').' '.Lang::line('validation.kilobytes')->get($this->language).'.'
|
||||
: rtrim($message, '.').' '.Lang::line('validation.characters')->get($this->language).'.';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user