diff --git a/app/finance/validate/InvoiceCheck.php b/app/finance/validate/InvoiceCheck.php new file mode 100644 index 0000000..f125c06 --- /dev/null +++ b/app/finance/validate/InvoiceCheck.php @@ -0,0 +1,26 @@ + 'require|float', + 'invoice_type' => 'require', + 'invoice_subject' => 'require', + 'id' => 'require' + ]; + + protected $message = [ + 'amount.require' => '开票金额不能为空', + 'amount.number' => '开票金额只能为数字', + 'id.require' => '缺少更新条件', + 'invoice_type.require' => '请选择开票类型', + 'invoice_subject.require' => '请选择开票主体', + ]; + + protected $scene = [ + 'add' => ['amount','invoice_type','invoice_subject'], + 'edit' => ['id', 'amount','invoice_type','invoice_subject'] + ]; +} \ No newline at end of file