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