* [bug#56820] Add name and desv length notic.

This commit is contained in:
liyang
2024-11-11 08:15:12 +08:00
committed by 曹延义
parent 7ee4cc22ed
commit a4a48e3d61
+10
View File
@@ -21,6 +21,16 @@ class hostZen extends host
*/
protected function checkFormData(object $formData): bool
{
if($formData->name && mb_strlen($formData->name) > 100)
{
dao::$errors['name'] = $this->lang->host->notice->nameLength;
}
if($formData->desc && mb_strlen($formData->desc) > 255)
{
dao::$errors['desc'] = $this->lang->host->notice->descLength;
}
$ipFields = explode(',', $this->config->host->create->ipFields);
foreach($ipFields as $field)
{