|
a4d91dde35
|
docs: 完善文档注释
|
2025-05-29 02:45:58 +08:00 |
|
|
9f0c7cd2fb
|
refactor: 新增 IValidator 接口
- 让 BaseValidator 继承自 IValidator 接口
- 更新相关测试用例中的类型引用
|
2025-05-28 23:09:52 +08:00 |
|
|
0a5dbd9f53
|
refactor!: 删除意义不大的 Validator 类
|
2025-05-28 23:06:48 +08:00 |
|
|
2d6ead8417
|
docs: 更改 @author 信息
|
2025-05-28 22:04:55 +08:00 |
|
|
0e9dbf9bd9
|
refactor!: BasePropertyValidator 的 equalsThat 重命名为 equalTo
|
2025-05-28 14:30:06 +08:00 |
|
|
f21e9727fa
|
refactor!: 修改异常信息
|
2025-05-28 14:28:09 +08:00 |
|
|
33fb20590b
|
chore: 补充 copyright 声明
|
2025-05-28 14:27:28 +08:00 |
|
|
08ebfc7d4b
|
docs: 删除关于 ValidTools 的描述
|
2025-05-28 14:26:12 +08:00 |
|
|
41ccb652d4
|
feat: 重载 ruleFor
通过自定义函数式接口,使 lambda 表达式作为入参时,可以进入不同的重载版本,从而返回不同类型属性的校验器。
|
2025-05-28 09:41:02 +08:00 |
|
|
37f4af67cd
|
feat: 添加 MapValidator#ruleForComparable
|
2025-05-28 09:40:00 +08:00 |
|
|
6cd47e369e
|
test: 添加 BasePropertyValidator#withRule 的反用例
|
2025-05-28 09:38:48 +08:00 |
|
|
dd8ae71192
|
更新项目描述
|
2025-05-28 03:12:18 +08:00 |
|
|
f15178f500
|
Merge branch 'prepare/1.0.0' of http://zhouxy.xyz:3000/plusone/plusone-validator into prepare/1.0.0
|
2025-05-28 03:02:19 +08:00 |
|
|
83d9b05d63
|
test: 完成单元测试
|
2025-05-28 02:36:34 +08:00 |
|
|
d81e6acc23
|
fix: StringPropertyValidator 默认匹配正则时不对 null 进行校验
|
2025-05-28 02:36:14 +08:00 |
|
|
124ce63323
|
refactor!: 删除 ValidTools
|
2025-05-28 02:35:21 +08:00 |
|
|
ff374a049e
|
style: 格式化代码
|
2025-05-28 00:00:55 +08:00 |
|
|
ae970cb393
|
feat: 重载校验规则
`BasePropertyValidator#notNull`、`CollectionPropertyValidator#notEmpty` 和 `CollectionPropertyValidator#isEmpty` 提供无参的版本
|
2025-05-27 23:53:58 +08:00 |
|
|
a28a6135a8
|
refactor: 优化错误提示
|
2025-05-27 23:46:09 +08:00 |
|
|
9f2ade6252
|
refactor: 修改类型参数名称
|
2025-05-27 23:33:03 +08:00 |
|
|
e38be765a7
|
refactor!: 修改字符串校验逻辑
`StringPropertyValidator` 内置的校验规则中,除了 `notEmpty` 和 `notBlank` 之外,属性值为 null 时不做校验。
|
2025-05-20 18:00:19 +08:00 |
|
|
bce648dc51
|
test: 完善单元测试
|
2025-05-20 17:41:23 +08:00 |
|
|
ad74a0bcd0
|
test: 完成 ComparablePropertyValidator 单元测试
|
2025-05-20 11:36:24 +08:00 |
|
|
dcf620b63e
|
refactor: 修改 BaseComparablePropertyValidator#inRange 默认提示语
|
2025-05-20 11:36:21 +08:00 |
|
|
358cdaf1ad
|
test: 完善单元测试
|
2025-05-20 11:36:17 +08:00 |
|
|
07483627a8
|
refactor!: StringPropertyValidator#length 使用闭区间
`StringPropertyValidator#length` 校验字符串长度在区间内时,要求字符串长度大于等于最小长度(min),小于等于最大长度(max)。
|
2025-05-20 11:08:52 +08:00 |
|
|
45dc111eb6
|
更新项目描述
|
2025-05-20 00:41:25 +08:00 |
|
|
19b7926f0d
|
refactor!: 修改数值校验器的 API
原 `IntPropertyValidator`、`LongPropertyValidator` 和 `DoublePropertyValidator` 的
`between` 方法,使用“左闭右开”区间,但方法签名上并不明确,容易产生歧义。
现改为 `gt`(GreaterThan)、`ge`(GreaterThanOrEqualTo)、`lt`(LessThan)、`le`(LessThanOrEqualTo)。
|
2025-05-19 21:16:27 +08:00 |
|
|
297649c63a
|
refactor: StringPropertyValidator 的 isNullOrEmpty 使用 Strings#isNullOrEmpty 进行逻辑判断
|
2025-05-19 20:41:47 +08:00 |
|
|
a9df6f8c0e
|
fix: 修改 StringPropertyValidator#length 中的错误信息
|
2025-05-19 17:33:01 +08:00 |
|
|
6585750e65
|
refactor!: StringPropertyValidator 的 email 方法重命名为 emailAddress
|
2025-05-19 17:29:39 +08:00 |
|
|
1b8a5634b3
|
refactor!: BasePropertyValidator 的 between 方法重命名为 inRange
1. `BasePropertyValidator` 的 `between` 方法重命名为 `inRange`,更符合语义;
2. 将判空作为规则的一部分。
|
2025-05-19 17:28:45 +08:00 |
|
|
ecdd0a616a
|
refactor!: BasePropertyValidator#isTrue 重命名为 must
|
2025-05-19 17:11:13 +08:00 |
|
|
dc28befe88
|
refactor!: DefaultComparablePropertyValidator 重命名为 ComparablePropertyValidator
|
2025-05-19 16:13:44 +08:00 |
|
|
73b7827e5f
|
refactor!: ComparablePropertyValidator 重命名为 BaseComparablePropertyValidator
|
2025-05-19 16:12:25 +08:00 |
|
|
6868a81c59
|
chore: 添加 Copyright 信息
|
2025-05-19 16:04:19 +08:00 |
|
|
5bd19b924a
|
add LICENSE.
Signed-off-by: ZhouXY108 <luquanlion@outlook.com>
|
2025-05-18 07:49:17 +00:00 |
|
|
4c4b037900
|
refactor!: 重命名 BoolPropertyValidator 中的方法
将 `BoolPropertyValidator` 中的 `isTrue` 重命名为 `isTrueValue`,
避免与 `BasePropertyValidator` 中的 `isTrue` 产生歧义;
`isFalse` 也相应地重命名为 `isFalseValue`。
Reviewed-on: plusone/plusone-validator#6
Co-authored-by: ZhouXY108 <luquanlion@outlook.com>
Co-committed-by: ZhouXY108 <luquanlion@outlook.com>
|
2025-05-18 13:34:22 +08:00 |
|
|
1b6925f65d
|
refactor!: 重命名不同属性的 validator
`ValidatorOfComparable` 重命名为 `ComparablePropertyValidator` 更合适;
不同类型的属性的 validator,原本是 `类型+Validator` 的命名,
改为 `类型+PropertyValidator` 的格式;明确是用于校验 property 的。
Reviewed-on: plusone/plusone-validator#5
Co-authored-by: ZhouXY108 <luquanlion@outlook.com>
Co-committed-by: ZhouXY108 <luquanlion@outlook.com>
|
2025-05-18 13:11:02 +08:00 |
|
|
818c8fb26f
|
refactor: 修改项目结构,创建 plusone-validator-parent ,将 plusone-validator 作为其 module
创建 `plusone-validator-parent`,将 `plusone-validator` 作为其 module,
方便后续在 `plusone-validator-parent` 下创建测试等相关子模块。
删除 `commons-lang3`,用 `plusone-commons` 的 `StringTools` 替代 `commons-lang3` 的 `StringUtils`。
补充测试依赖 `junit-jupiter-engine`。
|
2025-05-08 23:25:48 +08:00 |
|
|
6d5cad48e2
|
prepare: 1.0.0
|
2025-05-03 16:02:09 +08:00 |
|
|
39a24fa6dd
|
chore: 更新 .editorconfig
xml 文件缩进 2 空格
|
2025-05-03 15:57:24 +08:00 |
|
|
a79c5d1637
|
build: 调整依赖
|
2025-05-03 15:56:26 +08:00 |
|
|
770a675a07
|
style: 调整代码格式
|
2025-05-03 15:55:30 +08:00 |
|
|
8a6ac1fb8d
|
修改版本号。
|
2025-02-19 09:36:16 +08:00 |
|
|
07159d205a
|
优化泛型代码。
|
2025-02-19 09:35:58 +08:00 |
|
|
e651b40aa0
|
新增 ValidatorOfComparable。
|
2025-02-18 23:22:18 +08:00 |
|
|
011788b112
|
新增 LongValidator。
|
2025-02-18 22:31:37 +08:00 |
|
|
875150aa6e
|
完善单元测试。
|
2025-02-18 22:27:15 +08:00 |
|
|
75c24558cd
|
BaseValidator 改为抽象类。
|
2025-02-18 22:27:00 +08:00 |
|