You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
817 B
45 lines
817 B
<?php
|
|
|
|
namespace app\validate;
|
|
|
|
use think\Validate;
|
|
|
|
class InvoiceHeadValidate extends Validate
|
|
{
|
|
|
|
|
|
/**
|
|
* 验证规则.
|
|
*/
|
|
protected $rule = [
|
|
'type|抬头类型' => 'require|in:0,1',
|
|
'title|抬头名称' => 'require',
|
|
'tax_number|税号' => 'require|alphaNum|length:18',
|
|
'address|地址' => 'require',
|
|
'telephone|电话' => 'require|alphaDash',
|
|
'bank_name|开户行' => 'require',
|
|
'bank_account|账户' => 'require'
|
|
];
|
|
|
|
/**
|
|
* 提示消息.
|
|
*/
|
|
protected $message = [
|
|
];
|
|
|
|
/**
|
|
* 字段描述.
|
|
*/
|
|
protected $field = [
|
|
];
|
|
|
|
/**
|
|
* 验证场景.
|
|
*/
|
|
protected $scene = [
|
|
'type0' => ['title','tax_number'],
|
|
'type1' => ['title'],
|
|
'type' => ['type']
|
|
];
|
|
|
|
}
|
|
|