12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace App\Repositories\Validators\TCM;
- use \Prettus\Validator\Contracts\ValidatorInterface;
- use \Prettus\Validator\LaravelValidator;
- /**
- * Class DrugValidator.
- *
- * @package namespace App\Repositories\Validators\TCM;
- */
- class DrugValidator extends LaravelValidator
- {
- /**
- * Validation Rules
- *
- * @var array
- */
- protected $rules = [
- ValidatorInterface::RULE_CREATE => [
- "name" => 'required',
- "type" => 'required',
- "unit" => 'required',
- "area" => 'required',
- "remark" => 'sometimes',
- "sort" => 'required',
- "status" => 'required',
- ],
- ValidatorInterface::RULE_UPDATE => [
- "name" => 'required',
- "type" => 'required',
- "unit" => 'required',
- "area" => 'required',
- "remark" => 'sometimes',
- "sort" => 'required',
- "status" => 'required',
- ],
- ];
- }
|