-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.php
More file actions
38 lines (30 loc) · 1.08 KB
/
error.php
File metadata and controls
38 lines (30 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* 记录参数验证的错误号和错误信息
*/
return array(
// ip
'ip_format' => array(400110000, 'ip format error'),
// 数字检查
'digit_too_small' => array(400110010, 'digit too small'),
'digit_too_large' => array(400110011, 'digit too large'),
// 字符串检查
'string_too_short' => array(400110020, 'string too short'),
'string_too_long' => array(400110021, 'string too long'),
// 邮箱验证
'email_length' => array(400110030, 'email length 6-64 chars'),
'email_format' => array(400110031, 'email format error'),
'email_mx_not_exist'=> array(400110032, 'mx record not exist'),
// callback
'callback_format' => array(400110051, 'callback format error'),
// in检查
'in_not_in_haystack'=> array(400110070, 'not in'),
// 类型和长度检查
'type_incorrect' => array(400110091, 'not a %s'),
// 正则检查
'regx_not_matched' => array(400110095, 'not matched'),
// url
'url_format' => array(400110100, 'url format error'),
'url_invalid' => array(400110101, 'url is invalid'),
'url_not_trusted' => array(400110102, 'refer is not trusted'),
);