update
This commit is contained in:
parent
e623573382
commit
c05c691fa2
@ -46,7 +46,7 @@ class ProjectLaborContractValidate extends BaseValidate
|
|||||||
'trial_start_date' => 'dateFormat:Y-m-d',
|
'trial_start_date' => 'dateFormat:Y-m-d',
|
||||||
'trial_end_date' => 'dateFormat:Y-m-d',
|
'trial_end_date' => 'dateFormat:Y-m-d',
|
||||||
'release_time' => 'dateFormat:Y-m-d',
|
'release_time' => 'dateFormat:Y-m-d',
|
||||||
'annex' => 'checkFile',
|
'annex' => 'checkAnnex',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $message = [
|
protected $message = [
|
||||||
@ -160,11 +160,10 @@ class ProjectLaborContractValidate extends BaseValidate
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function checkFile($value): bool|string
|
public function checkAnnex($value): bool|string
|
||||||
{
|
{
|
||||||
if($value != ''){
|
if(!empty($value) && $value != ''){
|
||||||
$file = $value;//json_decode($value,true);
|
if(!is_array($value)){
|
||||||
if(empty($file)){
|
|
||||||
return '附件必须是json数组';
|
return '附件必须是json数组';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user