@builder6/tables 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "name": "@builder6/tables",
3
- "version": "0.6.3",
3
+ "version": "0.7.0",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "files": [
7
- "dist"
7
+ "dist",
8
+ "views"
8
9
  ],
9
10
  "scripts": {
10
11
  "build": "rm -rf dist && tsc",
11
12
  "build:watch": "rm -rf dist && tsc --watch"
12
13
  },
13
14
  "dependencies": {
14
- "@builder6/core": "^0.6.3",
15
+ "@builder6/core": "^0.7.0",
15
16
  "dataloader": "^2.2.3"
16
17
  },
17
18
  "publishConfig": {
18
19
  "access": "public"
19
20
  },
20
- "gitHead": "95072e46086936653f20eafe111f229d4f751c84"
21
+ "gitHead": "d30a865347a5c71f33e0c337658bae231a8d271d"
21
22
  }
@@ -0,0 +1,15 @@
1
+ ## 数据校验
2
+
3
+ 先校验字段值有效性,校验合法的各种字段类型值,再校验用户配置的校验规则,最终把所有校验错误信息合并提示给用户。
4
+
5
+ ### 字段类型校验
6
+
7
+ 各种字段类型校验规则:
8
+
9
+ - number: 合法number,小数位数
10
+ - date: 合法的日期格式,YYYY-MM-DD、YYYY/MM/DD,兼容前导0省略情况,另外兼容了 YYYY-MM-DDTHH:MM:SS.SSSZ 这种服务端返回的格式(复制其它字段列保存时,是保存整行数据,日期列会自动取这种格式提交)
11
+ - select: 数据类型只支持字符串,且必须是字段定义过的选项范围内值
12
+ - boolean: true/false TRUE/FALSE
13
+
14
+ 其它逻辑:每种字段类型校验失败都不会去主动变更转换字段值,以原始值交给ag-grid显示以明显告知用户数据不合法。
15
+