1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace App\Repositories\Validators\Course;
- use \Prettus\Validator\Contracts\ValidatorInterface;
- use \Prettus\Validator\LaravelValidator;
- /**
- * Class CourseChapterValidator.
- *
- * @package namespace App\Repositories\Validators;
- */
- class ChapterValidator extends LaravelValidator
- {
- /**
- * Validation Rules
- *
- * @var array
- */
- protected $rules = [
- ValidatorInterface::RULE_CREATE => [
- 'title' => 'required',
- 'sort' => 'required|integer',
- 'status' => 'required|integer',
- ],
- ValidatorInterface::RULE_UPDATE => [
- 'title' => 'required',
- 'sort' => 'required|integer',
- 'status' => 'required|integer',
- ],
- ];
- }
|