diff --git a/app/Http/Requests/Client/StoreClientRequest.php b/app/Http/Requests/Client/StoreClientRequest.php index a9636f3aa1..01d1aaf4e5 100644 --- a/app/Http/Requests/Client/StoreClientRequest.php +++ b/app/Http/Requests/Client/StoreClientRequest.php @@ -37,7 +37,8 @@ class StoreClientRequest extends Request /* Ensure we have a client name, and that all emails are unique*/ $rules['name'] = 'required|min:1'; $rules['id_number'] = 'unique:clients,id_number,,id,company_id,' . auth()->user()->company()->id; - + $rules['settings'] = 'json'; + $contacts = request('contacts'); if(is_array($contacts)) diff --git a/app/Http/Requests/Client/UpdateClientRequest.php b/app/Http/Requests/Client/UpdateClientRequest.php index 4286345a3a..3d8b05cec3 100644 --- a/app/Http/Requests/Client/UpdateClientRequest.php +++ b/app/Http/Requests/Client/UpdateClientRequest.php @@ -38,6 +38,7 @@ class UpdateClientRequest extends Request $rules['currency_id'] = 'integer|nullable'; $rules['country_id'] = 'integer|nullable'; $rules['shipping_country_id'] = 'integer|nullable'; + $rules['settings'] = 'json'; $contacts = request('contacts'); diff --git a/app/Http/Requests/Company/StoreCompanyRequest.php b/app/Http/Requests/Company/StoreCompanyRequest.php index db17aee86f..eea8c21588 100644 --- a/app/Http/Requests/Company/StoreCompanyRequest.php +++ b/app/Http/Requests/Company/StoreCompanyRequest.php @@ -35,7 +35,7 @@ class StoreCompanyRequest extends Request return [ 'name' => 'required', 'logo' => 'mimes:jpeg,jpg,png,gif|max:10000', // max 10000kb - + 'settings' => 'json', // 'documents' => 'mimes:png,ai,svg,jpeg,tiff,pdf,gif,psd,txt,doc,xls,ppt,xlsx,docx,pptx', ]; } diff --git a/app/Http/Requests/Company/UpdateCompanyRequest.php b/app/Http/Requests/Company/UpdateCompanyRequest.php index a7f1970266..c783f8adb3 100644 --- a/app/Http/Requests/Company/UpdateCompanyRequest.php +++ b/app/Http/Requests/Company/UpdateCompanyRequest.php @@ -40,6 +40,7 @@ class UpdateCompanyRequest extends Request 'size_id' => 'integer|nullable', 'country_id' => 'integer|nullable', 'work_email' => 'email|nullable', + 'settings' => 'json', ]; }