0
如果account_name
字段不具有值「0」,那麼我需要一個字段項目。我想要驗證此方案在laravel如果其他字段沒有特定值,則爲必填字段
eg if account_name = '0' -project_name field is not required
if account_name = '1' - project_name field is required
$this->validate($request,[
'project_name'=>'required_without:account_name,0',
]);