|
|
@ -7,24 +7,27 @@ use think\Validate; |
|
|
class InquiryValidate extends Validate |
|
|
class InquiryValidate extends Validate |
|
|
{ |
|
|
{ |
|
|
protected $rule = [ |
|
|
protected $rule = [ |
|
|
'phone|手机号' => 'require|mobile', |
|
|
|
|
|
'email|邮箱' => 'email|max:80', |
|
|
|
|
|
'company_name|公司名称' => 'max:255', |
|
|
|
|
|
|
|
|
'content|' => 'max:255', // 主题
|
|
|
'contacts_name|联系人名称' => 'require|max:255', |
|
|
'contacts_name|联系人名称' => 'require|max:255', |
|
|
'content|' => 'max:255', |
|
|
|
|
|
'form_source|' => 'require' |
|
|
|
|
|
|
|
|
'email|邮箱' => 'email|max:80', |
|
|
|
|
|
'phone|手机号' => 'require|mobile', |
|
|
|
|
|
'company_address|地址' => 'max:255', |
|
|
|
|
|
'explain|投诉内容' => 'require', |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
protected $message = [ |
|
|
protected $message = [ |
|
|
'phone.require' => '手机号不能为空', |
|
|
|
|
|
'phone.mobile' => '手机号格式错误', |
|
|
|
|
|
'email.email' => '邮箱格式错误', |
|
|
|
|
|
'email.max' => '邮箱账号长度不能超过128个字', |
|
|
|
|
|
|
|
|
'content.max' => '主题内容长度不能超过128个字', // 主题
|
|
|
'contacts_name.require' => '联系人名称不能为空', |
|
|
'contacts_name.require' => '联系人名称不能为空', |
|
|
'company_name.max' => '公司名称长度不能超过128个字', |
|
|
|
|
|
'contacts_name.max' => '联系人名称长度不能超过128个字', |
|
|
'contacts_name.max' => '联系人名称长度不能超过128个字', |
|
|
'content.max' => '询盘内容长度不能超过128个字', |
|
|
|
|
|
'form_source.require' => '询盘提交来源不能唯恐', |
|
|
|
|
|
|
|
|
'email.email' => '邮箱格式错误', |
|
|
|
|
|
'email.max' => '邮箱账号长度不能超过128个字', |
|
|
|
|
|
'phone.require' => '手机号不能为空', |
|
|
|
|
|
'phone.mobile' => '手机号格式错误', |
|
|
|
|
|
'company_address.max' => '地址长度不能超过128个字', |
|
|
|
|
|
'explain.require' => '投诉内容不能为空', |
|
|
|
|
|
|
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
} |
|
|
} |