1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2025-01-10 00:30:09 +00:00

Fixed validation

This commit is contained in:
Tim Düsterhus 2012-02-05 20:50:13 +01:00
parent 60bad41091
commit b87d577aa1

View File

@ -68,23 +68,8 @@ public function validate() {
parent::validate();
// validate title
try {
if (!I18nHandler::getInstance()->validateValue('title')) {
throw new UserInputException('title');
}
}
catch (UserInputException $e) {
$this->errorType[$e->getField()] = $e->getType();
}
// validate topic
try {
if (!I18nHandler::getInstance()->validateValue('topic')) {
throw new UserInputException('topic');
}
}
catch (UserInputException $e) {
$this->errorType[$e->getField()] = $e->getType();
if (!I18nHandler::getInstance()->validateValue('title')) {
throw new UserInputException('title');
}
}