当前位置: 首页>>编程示例 >>用法及示例精选 >>正文


PHP WHMCS ClientDetailsValidation用法及代码示例

在通过 Admin 或 Client 区域添加客户端或更新客户端之前执行。

参数

变量 类型 注意
firstname string 客户的名字
lastname string 客户的姓氏
companyname string 客户的公司,如果输入
email string 客户的电子邮件
address1 string 客户地址1
address2 string 客户的地址2,如果输入
city string 客户所在城市
state string 客户的状态
postcode string 客户的邮政编码/邮政编码
country string 客户的国家(2 个字符代码)
phonenumber string 客户的电话号码
tax_id string 客户的税号
paymentmethod string 如果选择,客户的默认付款方式
customfield string Key => Value 对的数组
securityqid int 仅来自管理区域或注册时
securityqans string 仅来自管理区域或注册时

响应

Return 接受 stringarray 。对single 错误消息使用字符串或对多个错误消息使用字符串的array

示例代码

<?php

add_hook('ClientDetailsValidation', 1, function($vars) {
    return [
        'Error message feedback error 1',
        'Error message feedback error 2',
    ];
});

相关用法


注:本文由纯净天空筛选整理自whmcs.com大神的英文原创作品 ClientDetailsValidation。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。