123456789101112131415161718192021222324252627 |
- <?php
- namespace app\admin\validate\medical;
- use support\Validate;
- class SalesmanValidate extends Validate
- {
- protected $rule = [
- 'salesman_id' => 'require|integer',
- 'salesman_shop_id' => 'require|integer',
- 'salesman_name|姓名' => 'require',
- 'salesman_username|登录名' => 'require|alphaDash',
- 'salesman_password|密码' => 'require|alphaDash',
- 'salesman_phone|手机号' => 'require|mobile',
- 'salesman_status' => 'require|in:0,1'
- ];
- protected $message = [];
- protected $scene = [
- 'add' => ['salesman_shop_id', 'salesman_name', 'salesman_username', 'salesman_password',
- 'salesman_phone', 'salesman_status'],
- 'update' => ['salesman_id', 'salesman_shop_id', 'salesman_name', 'salesman_username',
- 'salesman_phone', 'salesman_status'],
- ];
- }
|