mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
added unique validation and help text for company slug field
This commit is contained in:
@ -34,7 +34,8 @@ class CompaniesRequest extends FormRequest
|
||||
'required'
|
||||
],
|
||||
'slug' => [
|
||||
'required'
|
||||
'required',
|
||||
Rule::unique('companies')
|
||||
],
|
||||
'address.name' => [
|
||||
'nullable',
|
||||
|
||||
@ -30,7 +30,8 @@ class CompanyRequest extends FormRequest
|
||||
Rule::unique('companies')->ignore($this->header('company'), 'id'),
|
||||
],
|
||||
'slug' => [
|
||||
'nullable'
|
||||
'required',
|
||||
Rule::unique('companies')->ignore($this->header('company'), 'id'),
|
||||
],
|
||||
'address.country_id' => [
|
||||
'required',
|
||||
|
||||
@ -50,6 +50,7 @@
|
||||
|
||||
<BaseInputGroup
|
||||
:label="$tc('settings.company_info.company_slug')"
|
||||
:help-text="$t('settings.company_info.company_slug_help_text')"
|
||||
:error="
|
||||
v$.newCompanyForm.slug.$error &&
|
||||
v$.newCompanyForm.slug.$errors[0].$message
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
|
||||
<BaseInputGroup
|
||||
:label="$tc('wizard.company_slug')"
|
||||
:help-text="$t('wizard.company_slug_help_text')"
|
||||
:error="
|
||||
v$.companyForm.slug.$error &&
|
||||
v$.companyForm.slug.$errors[0].$message
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
|
||||
<BaseInputGroup
|
||||
:label="$tc('settings.company_info.company_slug')"
|
||||
:help-text="$t('settings.company_info.company_slug_help_text')"
|
||||
:error="v$.slug.$error && v$.slug.$errors[0].$message"
|
||||
required
|
||||
>
|
||||
|
||||
@ -864,6 +864,7 @@
|
||||
"company_info": "Company info",
|
||||
"company_name": "Company Name",
|
||||
"company_slug": "Company Slug",
|
||||
"company_slug_help_text": "A unique URL friendly name for your company. It will be used for the URL of your Customer Portal.",
|
||||
"company_logo": "Company Logo",
|
||||
"section_description": "Information about your company that will be displayed on invoices, estimates and other documents created by Crater.",
|
||||
"phone": "Phone",
|
||||
@ -1326,6 +1327,7 @@
|
||||
"company_info_desc": "This information will be displayed on invoices. Note that you can edit this later on settings page.",
|
||||
"company_name": "Company Name",
|
||||
"company_slug": "Company Slug",
|
||||
"company_slug_help_text": "A unique URL friendly name for your company. It will be used for the URL of your Customer Portal.",
|
||||
"company_logo": "Company Logo",
|
||||
"logo_preview": "Logo Preview",
|
||||
"preferences": "Company Preferences",
|
||||
|
||||
Reference in New Issue
Block a user