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:
parent
60bad41091
commit
b87d577aa1
@ -68,23 +68,8 @@ 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();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user