mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2025-04-22 14:04:52 +00:00
Fixed validation
This commit is contained in:
parent
60bad41091
commit
b87d577aa1
@ -68,23 +68,8 @@ class ChatRoomAddForm extends ACPForm {
|
|||||||
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…
x
Reference in New Issue
Block a user