mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
validation for payment number for store/update routes
This commit is contained in:
parent
5f2c745f01
commit
f86a57c632
@ -104,7 +104,8 @@ class StorePaymentRequest extends Request
|
||||
'credits.*.credit_id' => new ValidCreditsRules($this->all()),
|
||||
'credits.*.amount' => 'required',
|
||||
'invoices' => new ValidPayableInvoicesRule(),
|
||||
'number' => 'nullable',
|
||||
'number' => 'nullable|unique:payments,number,' . $this->id . ',id,company_id,' . $this->company_id,
|
||||
//'number' => 'nullable',
|
||||
];
|
||||
|
||||
|
||||
|
@ -40,6 +40,7 @@ class UpdatePaymentRequest extends Request
|
||||
'invoices' => ['array',new PaymentAppliedValidAmount,new ValidCreditsPresentRule],
|
||||
'invoices.*.invoice_id' => 'distinct',
|
||||
'documents' => 'mimes:png,ai,svg,jpeg,tiff,pdf,gif,psd,txt,doc,xls,ppt,xlsx,docx,pptx',
|
||||
'number' = 'nullable|unique:payments,number,' . $this->id . ',id,company_id,' . $this->company_id,
|
||||
];
|
||||
|
||||
if ($this->input('documents') && is_array($this->input('documents'))) {
|
||||
|
Loading…
Reference in New Issue
Block a user