2024-03-28 14:52:40 +05:30
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
|
|
|
|
|
class StorePartnerShipKYC extends FormRequest
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
|
*
|
|
|
|
|
* @return bool
|
|
|
|
|
*/
|
|
|
|
|
public function authorize()
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
public function rules()
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'name' => 'required|regex:/^[a-zA-Z\s]+$/',
|
|
|
|
|
'mobile_number' => 'required|regex:/^(\+\d{1,3}[- ]?)?\d{10,12}$/|unique:user_kycs,mobile_number,'.auth()->guard('users')->user()->id.',users_id',
|
|
|
|
|
'email' => 'required|regex:/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/|unique:user_kycs,email,'.auth()->guard('users')->user()->id.',users_id',
|
|
|
|
|
'dob' => 'required',
|
|
|
|
|
'father_name' => 'required|regex:/^[a-zA-Z\s]+$/',
|
|
|
|
|
'mother_name' => 'required|regex:/^[a-zA-Z\s]+$/',
|
|
|
|
|
'occupation' => 'required|regex:/^[a-zA-Z\s]+$/',
|
|
|
|
|
'place_of_birth' => 'required|regex:/^[a-zA-Z\s]+$/',
|
|
|
|
|
'gross_annual_income' => 'required|regex:/^[0-9]+$/',
|
|
|
|
|
'true_copy_of_partnership_deed' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
|
|
|
|
'registration_certificate' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
|
|
|
|
'pan_card' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
2024-06-04 12:00:48 +05:30
|
|
|
'list_of_partners_and_authorised_signatories' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
2024-03-28 14:52:40 +05:30
|
|
|
// 'pan_card_copy_of_authorized_signatory' => ',
|
2024-06-04 12:00:48 +05:30
|
|
|
'pan_card_copy_of_authorized_signatory.*' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
2024-03-28 14:52:40 +05:30
|
|
|
// 'aadhar_card_copy_of_authorized_signatory' => ',
|
2024-06-04 12:00:48 +05:30
|
|
|
'aadhar_card_copy_of_authorized_signatory.*' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
2024-03-28 14:52:40 +05:30
|
|
|
'tan_allotment_letter' => 'mimes:jpeg,png,jpg,pdf|max:2048',
|
2024-06-04 12:00:48 +05:30
|
|
|
'proof_of_address_firm' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
2024-03-28 14:52:40 +05:30
|
|
|
'latestIincome_tax_return_of_the_firm' => 'mimes:jpeg,png,jpg,pdf|max:2048',
|
2024-06-04 12:00:48 +05:30
|
|
|
'copy_of_cml' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
2024-03-28 14:52:40 +05:30
|
|
|
'copy_of_audited_balance_sheet_for_last' => 'mimes:jpeg,png,jpg,pdf|max:2048',
|
|
|
|
|
// 'passport_photo_authorized_signatories_partners' => ',
|
|
|
|
|
'passport_photo_authorized_signatories_partners.*' => 'mimes:jpeg,png,jpg,pdf|max:2048',
|
|
|
|
|
'cancelled_cheque' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function messages(){
|
|
|
|
|
return [
|
|
|
|
|
'required' => 'This :attribute field is required',
|
|
|
|
|
'unique' => "This :attribute field must be unique",
|
|
|
|
|
'regex' => "This :attribute field not proper",
|
|
|
|
|
'mimes' => "This :attribute field must contains extension jpeg,png,jpg",
|
|
|
|
|
'max' => "This :attribute field size should less than 2 MB",
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function validated()
|
|
|
|
|
{
|
|
|
|
|
return array_merge(parent::validated(), [
|
|
|
|
|
'kyc_type' => 'Partnership'
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
}
|