1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2025-01-11 00:40: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,25 +68,10 @@ public function validate() {
parent::validate(); parent::validate();
// validate title // validate title
try {
if (!I18nHandler::getInstance()->validateValue('title')) { if (!I18nHandler::getInstance()->validateValue('title')) {
throw new UserInputException('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();
}
}
/** /**
* @see wcf\form\IForm::save() * @see wcf\form\IForm::save()