73 lines
3.2 KiB
PHP
73 lines
3.2 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class StoreCompanyKYC 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',
|
|
'occupation' => 'required|regex:/^[a-zA-Z\s]+$/',
|
|
'place_of_birth' => 'required|regex:/^[a-zA-Z\s]+$/',
|
|
'gross_annual_income' => 'required|regex:/^[0-9]+$/',
|
|
'memorandum_or_articles_of_association' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
|
'company_pan' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
|
'certificate_of_incorporation' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
|
'tan_allotment_letter' => 'mimes:jpeg,png,jpg,pdf|max:2048',
|
|
'List_of_directors_or_authorized_signatories' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
|
// 'pan_card_copy_of_authorized_signatory' => ',
|
|
'pan_card_copy_of_authorized_signatory' => 'required|required|mimes:jpeg,png,jpg,pdf|max:2048',
|
|
// 'aadhar_card_copy_of_authorized_signatory' => ',
|
|
'aadhar_card_copy_of_authorized_signatory' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
|
'proof_of_address_of_the_company' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
|
'latest_income_tax_return_of_the_company_Of_last_2_years' => 'mimes:jpeg,png,jpg,pdf|max:2048',
|
|
'copy_of_cml' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
|
'copy_of_audited_balance_sheet_for_the_last_2_f_y' => 'mimes:jpeg,png,jpg,pdf|max:2048',
|
|
// 'passport_photo_all_authorized_signatories_or_directors' => ',
|
|
'passport_photo_all_authorized_signatories_or_directors' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
|
'true_copy_form_32_or_dir_12_alongwith_roc_fee_payment' => 'mimes:jpeg,png,jpg,pdf|max:2048',
|
|
'true_copy_form_no_18_or_inc_22_alongwith_roc_fee_payment' => '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' => 'Company'
|
|
]);
|
|
}
|
|
}
|