1234567891011121314151617181920212223 |
- <?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'],
- ];
- }
|