Changeset 2082

Show
Ignore:
Timestamp:
02/19/08 13:21:23 (5 months ago)
Author:
Shadowhand
Message:

Flexiblimilizing Validation somewhat.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/system/libraries/Validation.php

    r2071 r2082  
    9292         * @return  string|object 
    9393         */ 
    94         public function message($input, $message = NULL) 
     94        public function message($input = NULL, $message = NULL) 
    9595        { 
    9696                if ($message === NULL) 
    9797                { 
     98                        if ($input === NULL) 
     99                        { 
     100                                $messages = array(); 
     101                                foreach (array_keys($this->messages) as $input) 
     102                                { 
     103                                        $messages[] = $this->message($input); 
     104                                } 
     105 
     106                                return implode("\n", $messages); 
     107                        } 
     108 
    98109                        // Return nothing if no message exists 
    99110                        if (empty($this->messages[$input]))