refactor: 修改验证多语言提示
This commit is contained in:
@@ -1,39 +1,37 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'公司名称不能为空' => 'Company Name is required',
|
||||
'公司名称不能超过64个字符' => 'Company Name cannot exceed 64 characters',
|
||||
'姓不能为空' => 'Last name is required',
|
||||
'姓不能超过:rule个字符' => 'Last name cannot exceed :rule characters',
|
||||
'名不能为空' => 'First Name is required',
|
||||
'名不能超过:rule个字符' => 'First name cannot exceed :rule characters',
|
||||
'姓名不能为空' => 'Name is required',
|
||||
'姓名不能超过:rule个字符' => 'Name cannot exceed :rule characters',
|
||||
'电话号码不能为空' => 'Phone Number is required',
|
||||
'电话号码不能超过:rule个字符' => 'Phone number cannot exceed :rule characters',
|
||||
'感兴趣的产品种类不能超过:rule个字符' => 'Interested product categories cannot exceed :rule characters',
|
||||
'邮箱不能为空' => 'Email is required',
|
||||
'邮箱格式不正确' => 'Email format is incorrect',
|
||||
'邮箱不能超过128个字符' => 'Email cannot exceed 128 characters',
|
||||
'电话号码不能为空' => 'Phone Number is required',
|
||||
'电话号码不能超过64个字符' => 'Phone Number cannot exceed 64 characters',
|
||||
'业务类型不能为空' => 'Type of Business is required',
|
||||
'业务类型不能超过128个字符' => 'Type of Business cannot exceed 128 characters',
|
||||
'企业规模不能为空' => 'Enterprise Size is required',
|
||||
'企业规模不能超过128个字符' => 'Enterprise Size cannot exceed 128 characters',
|
||||
'公司地址不能为空' => 'Company Address is required',
|
||||
'公司地址不能超过255个字符' => 'Company Address cannot exceed 255 characters',
|
||||
'留言不能为空' => 'Message is required',
|
||||
'公司名称不能超过128个字符' => 'Company name cannot exceed 128 characters',
|
||||
'网址不能超过255个字符' => 'URL cannot exceed 255 characters',
|
||||
'名不能为空' => 'First Name is required',
|
||||
'名不能超过64个字符' => 'First name cannot exceed 64 characters',
|
||||
'姓不能为空' => 'Last name is required',
|
||||
'姓不能超过64个字符' => 'Last name cannot exceed 64 characters',
|
||||
'电话号码不能超过32个字符' => 'Phone number cannot exceed 32 characters',
|
||||
'感兴趣的产品种类不能超过255个字符' => 'Interested product categories cannot exceed 255 characters',
|
||||
'留言内容不能为空' => 'Message content is required',
|
||||
'留言内容不能超过1024个字符' => 'Message content cannot exceed 1024 characters',
|
||||
'姓名不能为空' => 'Name is required',
|
||||
'问题不能为空' => 'Question is required',
|
||||
'问题不能超过1024个字符' => 'Question cannot exceed 1024 characters',
|
||||
'邮箱不能超过:rule个字符' => 'Email cannot exceed :rule characters',
|
||||
'国家不能为空' => 'Country is required',
|
||||
'国家不能超过128个字符' => 'Country cannot exceed 128 characters',
|
||||
'国家不能超过:rule个字符' => 'Country cannot exceed :rule characters',
|
||||
'网址不能超过:rule个字符' => 'URL cannot exceed :rule characters',
|
||||
'公司名称不能为空' => 'Company Name is required',
|
||||
'公司名称不能超过:rule个字符' => 'Company name cannot exceed :rule characters',
|
||||
'公司地址不能为空' => 'Company Address is required',
|
||||
'公司地址不能超过:rule个字符' => 'Company Address cannot exceed :rule characters',
|
||||
'企业规模不能为空' => 'Enterprise Size is required',
|
||||
'企业规模不能超过:rule个字符' => 'Enterprise Size cannot exceed :rule characters',
|
||||
'业务类型不能为空' => 'Type of Business is required',
|
||||
'业务类型不能超过:rule个字符' => 'Type of Business cannot exceed :rule characters',
|
||||
'公司/组织不能为空' => 'Company/Organization is required',
|
||||
'公司/组织不能超过128个字符' => 'Company/Organization cannot exceed 128 characters',
|
||||
'公司/组织不能超过:rule个字符' => 'Company/Organization cannot exceed :rule characters',
|
||||
'行业不能为空' => 'Industry is required',
|
||||
'行业不能超过64个字符' => 'Industry cannot exceed 64 characters',
|
||||
'行业不能超过:rule个字符' => 'Industry cannot exceed :rule characters',
|
||||
'询问内容不能为空' => 'Inquiry is required',
|
||||
'询问内容不能超过1024个字符' => 'Inquiry cannot exceed 1024 characters',
|
||||
'询问内容不能超过:rule个字符' => 'Inquiry cannot exceed :rule characters',
|
||||
'留言内容不能为空' => 'Message content is required',
|
||||
'留言内容不能超过:rule个字符' => 'Message content cannot exceed :rule characters',
|
||||
'问题不能为空' => 'Question is required',
|
||||
'问题不能超过:rule个字符' => 'Question cannot exceed :rule characters',
|
||||
];
|
||||
@@ -32,18 +32,18 @@ class ContactUsBulkBuyValidate extends Validate
|
||||
*/
|
||||
protected $message = [
|
||||
'corp_name.require' => '公司名称不能为空',
|
||||
'corp_name.max' => '公司名称不能超过128个字符',
|
||||
'url.max' => '网址不能超过255个字符',
|
||||
'corp_name.max' => '公司名称不能超过:rule个字符',
|
||||
'url.max' => '网址不能超过:rule个字符',
|
||||
'first_name.require' => '名不能为空',
|
||||
'first_name.max' => '名不能超过64个字符',
|
||||
'first_name.max' => '名不能超过:rule个字符',
|
||||
'last_name.require' => '姓不能为空',
|
||||
'last_name.max' => '姓不能超过64个字符',
|
||||
'last_name.max' => '姓不能超过:rule个字符',
|
||||
'email.require' => '邮箱不能为空',
|
||||
'email.email' => '邮箱格式不正确',
|
||||
'email.max' => '邮箱不能超过128个字符',
|
||||
'phone.max' => '电话号码不能超过32个字符',
|
||||
'interested.max' => '感兴趣的产品种类不能超过255个字符',
|
||||
'email.max' => '邮箱不能超过:rule个字符',
|
||||
'phone.max' => '电话号码不能超过:rule个字符',
|
||||
'interested.max' => '感兴趣的产品种类不能超过:rule个字符',
|
||||
'message.require' => '留言内容不能为空',
|
||||
'message.max' => '留言内容不能超过1024个字符',
|
||||
'message.max' => '留言内容不能超过:rule个字符',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -31,18 +31,18 @@ class ContactUsDistributorValidate extends Validate
|
||||
*/
|
||||
protected $message = [
|
||||
'corp_name.require' => '公司名称不能为空',
|
||||
'corp_name.max' => '公司名称不能超过64个字符',
|
||||
'corp_name.max' => '公司名称不能超过:rule个字符',
|
||||
'email.require' => '邮箱不能为空',
|
||||
'email.email' => '邮箱格式不正确',
|
||||
'email.max' => '邮箱不能超过128个字符',
|
||||
'email.max' => '邮箱不能超过:rule个字符',
|
||||
'phone.require' => '电话号码不能为空',
|
||||
'phone.max' => '电话号码不能超过64个字符',
|
||||
'phone.max' => '电话号码不能超过:rule个字符',
|
||||
'business_type.require' => '业务类型不能为空',
|
||||
'business_type.max' => '业务类型不能超过128个字符',
|
||||
'business_type.max' => '业务类型不能超过:rule个字符',
|
||||
'enterprise_size.require' => '企业规模不能为空',
|
||||
'enterprise_size.max' => '企业规模不能超过128个字符',
|
||||
'enterprise_size.max' => '企业规模不能超过:rule个字符',
|
||||
'address.require' => '公司地址不能为空',
|
||||
'address.max' => '公司地址不能超过255个字符',
|
||||
'address.max' => '公司地址不能超过:rule个字符',
|
||||
'message.require' => '留言不能为空',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -27,11 +27,11 @@ class ContactUsMessageValidate extends Validate
|
||||
*/
|
||||
protected $message = [
|
||||
'name.require' => '姓名不能为空',
|
||||
'name.max' => '姓名不能超过64个字符',
|
||||
'name.max' => '姓名不能超过:rule个字符',
|
||||
'email.require' => '邮箱不能为空',
|
||||
'email.email' => '邮箱格式不正确',
|
||||
'email.max' => '邮箱不能超过128个字符',
|
||||
'email.max' => '邮箱不能超过:rule个字符',
|
||||
'content.require' => '问题不能为空',
|
||||
'content.max' => '问题不能超过1024个字符'
|
||||
'content.max' => '问题不能超过:rule个字符'
|
||||
];
|
||||
}
|
||||
|
||||
@@ -32,20 +32,20 @@ class ProductInquiryValidate extends Validate
|
||||
*/
|
||||
protected $message = [
|
||||
'first_name.require' => '名不能为空',
|
||||
'first_name.max' => '名不能超过64个字符',
|
||||
'first_name.max' => '名不能超过:rule个字符',
|
||||
'last_name.require' => '姓不能为空',
|
||||
'last_name.max' => '姓不能超过64个字符',
|
||||
'last_name.max' => '姓不能超过:rule个字符',
|
||||
'email.require' => '邮箱不能为空',
|
||||
'email.email' => '邮箱格式不正确',
|
||||
'email.max' => '邮箱不能超过128个字符',
|
||||
'phone.max' => '电话号码不能超过32个字符',
|
||||
'email.max' => '邮箱不能超过:rule个字符',
|
||||
'phone.max' => '电话号码不能超过:rule个字符',
|
||||
'country_name.require' => '国家不能为空',
|
||||
'country_name.max' => '国家不能超过128个字符',
|
||||
'country_name.max' => '国家不能超过:rule个字符',
|
||||
'corp_name.require' => '公司/组织不能为空',
|
||||
'corp_name.max' => '公司/组织不能超过128个字符',
|
||||
'corp_name.max' => '公司/组织不能超过:rule个字符',
|
||||
'industry.require' => '行业不能为空',
|
||||
'industry.max' => '行业不能超过64个字符',
|
||||
'industry.max' => '行业不能超过:rule个字符',
|
||||
'message.require' => '询问内容不能为空',
|
||||
'message.max' => '询问内容不能超过1024个字符'
|
||||
'message.max' => '询问内容不能超过:rule个字符'
|
||||
];
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<li class="attr_value tip1 attr_item" data-index="{$pk}">
|
||||
{eq name="attr_value_type" value="IMAGE"}
|
||||
<span class="co-bg"><img src="{$pv.attr_value}" /></span>
|
||||
{elseif condition="attr_value_type == 'RGB'" /}
|
||||
{elseif condition="$attr_value_type == 'RGB'" /}
|
||||
<span class="co-bg" {:style(['background-color'=>$pv.attr_value])}></span>
|
||||
{else/}
|
||||
<span>{$pv.attr_value}</span>
|
||||
@@ -130,15 +130,15 @@
|
||||
<p><strong class="redstr">*</strong>{:lang_i18n('姓名')}</p>
|
||||
<div class="name clearfix">
|
||||
<input type="text" class="first detail-w02" placeholder="{:lang_i18n('请输入您的名称')}"
|
||||
name="firstname" id="firstname" style="margin-right:0.5rem;">
|
||||
name="first_name" id="firstname" style="margin-right:0.5rem;">
|
||||
<input type="text" class="first detail-w02" placeholder="{:lang_i18n('请输入您的姓氏')}"
|
||||
name="lastname" id="lastname">
|
||||
name="last_name" id="lastname">
|
||||
</div>
|
||||
</div>
|
||||
<div class=" clearfix">
|
||||
<p><strong class="redstr">*</strong>{:lang_i18n('公司/组织')}</p>
|
||||
<div class="redstr">
|
||||
<input type="text" class="first detail-w01" id="companyName" name="companyName">
|
||||
<input type="text" class="first detail-w01" id="companyName" name="company_name">
|
||||
</div>
|
||||
</div>
|
||||
<div class=" clearfix">
|
||||
@@ -156,7 +156,7 @@
|
||||
<div class="clearfix">
|
||||
<p><strong class="redstr">*</strong>{:lang_i18n('国家')}</p>
|
||||
<div class="redstr">
|
||||
<select class=" detail-w01" id="country" name="country">
|
||||
<select class=" detail-w01" id="country" name="corp_name">
|
||||
<option value="">--- {:lang_i18n('请选择所属国家')} ---</option>
|
||||
{volist name="country_list" id="country"}
|
||||
<option value="{$country}">{$country}</option>
|
||||
@@ -173,7 +173,7 @@
|
||||
<div class=" clearfix">
|
||||
<p><strong style="color: red;">*</strong>{:lang_i18n('询问内容')}</p>
|
||||
<div>
|
||||
<textarea rows="3" cols="20" class="first detail-w01" id="inquiry" name="inquiry"></textarea>
|
||||
<textarea rows="3" cols="20" class="first detail-w01" id="message" name="message"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submit_btn" id="send">{:lang_i18n('提交')}</div>
|
||||
|
||||
Reference in New Issue
Block a user