public function on($attribute) { $errors = $this->{$attribute}; return $errors && count($errors) == 1 ? $errors[0] : $errors; }