|
@@ -25,6 +25,10 @@ class BodyMeasurements extends Validate
|
|
|
'underbust' => 'float|egt:0|elt:150',
|
|
|
'inseam' => 'float|egt:0|elt:150',
|
|
|
'outseam' => 'float|egt:0|elt:150',
|
|
|
+ 'knee' => 'float|egt:0|elt:80',
|
|
|
+ 'arm_length' => 'float|egt:0|elt:100',
|
|
|
+ 'wrist' => 'float|egt:0|elt:30',
|
|
|
+ 'pants_length' => 'float|egt:0|elt:150',
|
|
|
'shoe_size' => 'length:0,10',
|
|
|
'measurement_date' => 'date',
|
|
|
];
|
|
@@ -73,13 +77,25 @@ class BodyMeasurements extends Validate
|
|
|
'outseam.float' => '外缝长必须是数字',
|
|
|
'outseam.egt' => '外缝长不能小于0',
|
|
|
'outseam.elt' => '外缝长不能大于150厘米',
|
|
|
+ 'knee.float' => '膝围必须是数字',
|
|
|
+ 'knee.egt' => '膝围不能小于0',
|
|
|
+ 'knee.elt' => '膝围不能大于80厘米',
|
|
|
+ 'arm_length.float' => '臂长必须是数字',
|
|
|
+ 'arm_length.egt' => '臂长不能小于0',
|
|
|
+ 'arm_length.elt' => '臂长不能大于100厘米',
|
|
|
+ 'wrist.float' => '腕围必须是数字',
|
|
|
+ 'wrist.egt' => '腕围不能小于0',
|
|
|
+ 'wrist.elt' => '腕围不能大于30厘米',
|
|
|
+ 'pants_length.float' => '裤长必须是数字',
|
|
|
+ 'pants_length.egt' => '裤长不能小于0',
|
|
|
+ 'pants_length.elt' => '裤长不能大于150厘米',
|
|
|
'shoe_size.length' => '鞋码长度不能超过10个字符',
|
|
|
'measurement_date.date' => '测量日期格式错误',
|
|
|
];
|
|
|
|
|
|
// 验证场景
|
|
|
protected $scene = [
|
|
|
- 'add' => ['profile_id', 'chest', 'waist', 'hip', 'thigh', 'calf', 'upper_arm', 'forearm', 'neck', 'shoulder_width', 'bust', 'underbust', 'inseam', 'outseam', 'shoe_size', 'measurement_date'],
|
|
|
+ 'add' => ['profile_id', 'chest', 'waist', 'hip', 'thigh', 'calf', 'upper_arm', 'forearm', 'neck', 'shoulder_width', 'bust', 'underbust', 'inseam', 'outseam', 'knee', 'arm_length', 'wrist', 'pants_length', 'shoe_size', 'measurement_date'],
|
|
|
];
|
|
|
|
|
|
|