feat(billing): renewals, coupons, VAT numbering, billing cycles and invoice payment tracking
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
ea9a53f742
commit
25f23d541e
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Api;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class BillingProfileRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'invoice_company' => 'nullable|string|max:255|required_with:tax_code',
|
||||
'tax_code' => ['nullable', 'string', 'regex:/^\d{10}(-\d{3})?$/'],
|
||||
'invoice_address' => 'nullable|string|max:500',
|
||||
'invoice_email' => 'nullable|email|max:255',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'tax_code.regex' => 'Mã số thuế phải gồm 10 số hoặc 13 số (dạng 0123456789-001)',
|
||||
'invoice_company.required_with' => 'Vui lòng nhập tên đơn vị khi có mã số thuế',
|
||||
'invoice_email.email' => 'Email nhận hóa đơn không hợp lệ',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user