mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 04:24:33 -04:00
Portal Domain Validation (#3098)
* fix for blank client settings * Force all custom fields to strings * Fixes for bulk actions * Fix for client transformer * Validation for portal domain -> url * Portal Domain Validation
This commit is contained in:
parent
cec7b756e8
commit
34cf93b78e
@ -37,7 +37,7 @@ class StoreCompanyRequest extends Request
|
|||||||
//$rules['name'] = 'required';
|
//$rules['name'] = 'required';
|
||||||
$rules['company_logo'] = 'mimes:jpeg,jpg,png,gif|max:10000'; // max 10000kb
|
$rules['company_logo'] = 'mimes:jpeg,jpg,png,gif|max:10000'; // max 10000kb
|
||||||
$rules['settings'] = new ValidSettingsRule();
|
$rules['settings'] = new ValidSettingsRule();
|
||||||
|
$rules['portal_domain'] = 'url';
|
||||||
return $rules;
|
return $rules;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,8 @@ class UpdateCompanyRequest extends Request
|
|||||||
$rules['size_id'] = 'integer|nullable';
|
$rules['size_id'] = 'integer|nullable';
|
||||||
$rules['country_id'] = 'integer|nullable';
|
$rules['country_id'] = 'integer|nullable';
|
||||||
$rules['work_email'] = 'email|nullable';
|
$rules['work_email'] = 'email|nullable';
|
||||||
|
$rules['portal_domain'] = 'url';
|
||||||
|
|
||||||
|
|
||||||
return $rules;
|
return $rules;
|
||||||
|
|
||||||
|
@ -94,8 +94,8 @@ class ClientTransformer extends EntityTransformer
|
|||||||
'city' => $client->city ?: '',
|
'city' => $client->city ?: '',
|
||||||
'state' => $client->state ?: '',
|
'state' => $client->state ?: '',
|
||||||
'postal_code' => $client->postal_code ?: '',
|
'postal_code' => $client->postal_code ?: '',
|
||||||
'country_id' => $client->country_id ?: '',
|
'country_id' => (string)$client->country_id ?: '',
|
||||||
'industry_id' => $client->industry_id ?: '',
|
'industry_id' => (string)$client->industry_id ?: '',
|
||||||
'custom_value1' => $client->custom_value1 ?: '',
|
'custom_value1' => $client->custom_value1 ?: '',
|
||||||
'custom_value2' => $client->custom_value2 ?: '',
|
'custom_value2' => $client->custom_value2 ?: '',
|
||||||
'custom_value3' => $client->custom_value3 ?: '',
|
'custom_value3' => $client->custom_value3 ?: '',
|
||||||
@ -105,7 +105,7 @@ class ClientTransformer extends EntityTransformer
|
|||||||
'shipping_city' => $client->shipping_city ?: '',
|
'shipping_city' => $client->shipping_city ?: '',
|
||||||
'shipping_state' => $client->shipping_state ?: '',
|
'shipping_state' => $client->shipping_state ?: '',
|
||||||
'shipping_postal_code' => $client->shipping_postal_code ?: '',
|
'shipping_postal_code' => $client->shipping_postal_code ?: '',
|
||||||
'shipping_country_id' => $client->shipping_country_id ?: '',
|
'shipping_country_id' => (string)$client->shipping_country_id ?: '',
|
||||||
'settings' => $client->settings ?: new \stdClass,
|
'settings' => $client->settings ?: new \stdClass,
|
||||||
'is_deleted' => (bool) $client->is_deleted,
|
'is_deleted' => (bool) $client->is_deleted,
|
||||||
'vat_number' => $client->vat_number ?: '',
|
'vat_number' => $client->vat_number ?: '',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user