123456789101112131415161718192021222324 |
- <?php
- namespace app\admin\validate\life;
- use think\Validate;
- class FarmLandValidate extends Validate
- {
- protected $rule = [
- 'land_id' => 'require|integer',
- 'land_name' => 'require|chsDash',
- 'land_price' => 'require|float',
- 'land_long' => 'require|regex:/^[0-9\.]+$/',
- 'land_lat' => 'require|regex:/^[0-9\.]+$/'
- ];
- protected $message = [];
- protected $scene = [
- 'add' => ['land_name', 'land_price', 'land_long', 'land_lat'],
- 'update' => ['land_id', 'land_name', 'land_price', 'land_long', 'land_lat'],
- 'info'=>['land_id'],
- ];
- }
|