changes to view class to have error collector.
This commit is contained in:
@@ -31,6 +31,17 @@ class Error_Collector {
|
||||
$this->messages[$attribute][] = $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if errors exist for an attribute.
|
||||
*
|
||||
* @param string $attribute
|
||||
* @return bool
|
||||
*/
|
||||
public function has($attribute)
|
||||
{
|
||||
return $this->first($attribute) !== '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the first error message for an attribute.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user