mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-22 03:32:47 +08:00
23 lines
468 B
PHP
23 lines
468 B
PHP
<?php
|
|
|
|
namespace App\Validators;
|
|
|
|
use App\Exceptions\BadRequest as BadRequestException;
|
|
use App\Library\Validators\Common as CommonValidator;
|
|
|
|
class ChapterVod extends Validator
|
|
{
|
|
|
|
public function checkFileId($fileId)
|
|
{
|
|
$value = $this->filter->sanitize($fileId, ['trim', 'string']);
|
|
|
|
if (!CommonValidator::intNumber($value)) {
|
|
throw new BadRequestException('chapter_vod.invalid_file_id');
|
|
}
|
|
|
|
return $value;
|
|
}
|
|
|
|
}
|