public static function get_validated_input($question, InputValidation_Validator $validator)
 {
     while (TRUE) {
         try {
             echo $question;
             $answer = trim(fgets(STDIN));
             if ($validator->validate($answer)) {
                 return $answer;
             }
         } catch (InputValidation_InvalidInputException $e) {
             echo $e->getMessage() . "\n";
             continue;
         }
     }
 }
 private function validate_ea_pattern($email_address, $regex, $exception_message = '\'%s\' is not a valid email address!')
 {
     return parent::validate_pattern($email_address, $regex, $exception_message);
 }