123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace App\Repositories\Validators\Base;
- use \Prettus\Validator\Contracts\ValidatorInterface;
- use \Prettus\Validator\LaravelValidator;
- /**
- * Class ShopValidator.
- *
- * @package namespace App\Repositories\Validators\Base;
- */
- class ShopValidator extends LaravelValidator
- {
- /**
- * Validation Rules
- *
- * @var array
- */
- protected $rules = [
- ValidatorInterface::RULE_CREATE => [
- 'name' => 'required',
- 'sign' => 'nullable',
- 'end_time' => 'nullable|date',
- 'status' => 'nullable|sometimes|integer'
- ],
- ValidatorInterface::RULE_UPDATE => [
- 'name' => 'required',
- 'end_time' => 'nullable|date',
- 'status' => 'nullable|sometimes|integer'
- ],
- ];
- }
|