12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace App\Repositories\Validators\Course;
- use \Prettus\Validator\Contracts\ValidatorInterface;
- use \Prettus\Validator\LaravelValidator;
- /**
- * Class OrganizationValidator.
- *
- * @package namespace App\Repositories\Validators\Course;
- */
- class OrganizationValidator extends LaravelValidator
- {
- /**
- * Validation Rules
- *
- * @var array
- */
- protected $rules = [
- ValidatorInterface::RULE_CREATE => [
- 'name' => 'required',
- 'coordinator_id' => 'nullable|integer',
- 'cover' => 'nullable|integer',
- 'tags' => 'nullable',
- 'intro' => 'nullable',
- 'is_issue' => 'nullable|integer',
- 'status' => 'nullable|integer',
- ],
- ValidatorInterface::RULE_UPDATE => [
- 'name' => 'required',
- 'coordinator_id' => 'nullable|integer',
- 'cover' => 'sometimes|nullable|integer',
- 'tags' => 'nullable',
- 'intro' => 'nullable',
- 'is_issue' => 'nullable|integer',
- 'status' => 'nullable|integer',
- ],
- ];
- }
|