| Package | Description |
|---|---|
| org.aoju.bus.validate | |
| org.aoju.bus.validate.strategy | |
| org.aoju.bus.validate.validators |
| Modifier and Type | Method and Description |
|---|---|
static Context |
Context.newInstance()
提供一个包含默认校验器注册中心的校验器上下文
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
Provider.on(Object object,
Annotation[] annotations,
Context context)
被校验对象
|
static <T> T |
Builder.on(Object object,
Annotation[] annotations,
Context context)
被校验对象
|
static <T> T |
Provider.on(Object object,
Annotation[] annotations,
Context context,
String field)
被校验对象
|
static <T> T |
Builder.on(Object object,
Annotation[] annotations,
Context context,
String field)
被校验对象
|
static <T> T |
Provider.on(Object object,
Context context)
被校验对象
|
static <T> T |
Builder.on(Object object,
Context context)
被校验对象
每次都创建一个新的对象,避免线程问题
可以使用
ThreadLocal 简单优化 |
static ValidateException |
Provider.resolve(Property property,
Context context)
解析校验异常
|
| Constructor and Description |
|---|
Validated(Object object,
Annotation[] annotations,
Context context)
被校验对象
|
Validated(Object object,
Annotation[] annotations,
Context context,
String field)
被校验对象
|
Validated(Object object,
Context parentContext)
被校验对象
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
FalseStrategy.on(Boolean object,
False annotation,
Context context) |
boolean |
TrueStrategy.on(Boolean object,
True annotation,
Context context) |
boolean |
CompareStrategy.on(Object object,
Compare annotation,
Context context) |
boolean |
NullStrategy.on(Object object,
Context context) |
boolean |
DateStrategy.on(Object object,
Date annotation,
Context context) |
boolean |
EachStrategy.on(Object object,
Each annotation,
Context context) |
boolean |
EnglishStrategy.on(Object object,
English annotation,
Context context) |
boolean |
InEnumStrategy.on(Object object,
InEnum annotation,
Context context) |
boolean |
IntRangeStrategy.on(Object object,
IntRange annotation,
Context context) |
boolean |
IPAddressStrategy.on(Object object,
IPAddress annotation,
Context context) |
boolean |
LengthStrategy.on(Object object,
Length annotation,
Context context) |
boolean |
MobileStrategy.on(Object object,
Mobile annotation,
Context context) |
boolean |
MultiStrategy.on(Object object,
Multi multi,
Context context) |
boolean |
NotNullStrategy.on(Object object,
NotNull annotation,
Context context) |
boolean |
NullStrategy.on(Object object,
Null annotation,
Context context) |
boolean |
AlwaysStrategy.on(Object object,
Object annotation,
Context context) |
boolean |
PhoneStrategy.on(Object object,
Phone annotation,
Context context) |
boolean |
ReflectStrategy.on(Object object,
Reflect annotation,
Context context) |
boolean |
BlankStrategy.on(String object,
Blank annotation,
Context context) |
boolean |
ChineseStrategy.on(String object,
Chinese annotation,
Context context) |
boolean |
CitizenIdStrategy.on(String object,
CitizenId annotation,
Context context) |
boolean |
NotBlankStrategy.on(String object,
Context context) |
boolean |
BlankStrategy.on(String object,
Context context) |
boolean |
EmailStrategy.on(String object,
Email annotation,
Context context) |
boolean |
EqualsStrategy.on(String object,
Equals annotation,
Context context) |
boolean |
InStrategy.on(String object,
In annotation,
Context context) |
boolean |
NotBlankStrategy.on(String object,
NotBlank annotation,
Context context) |
boolean |
NotInStrategy.on(String object,
NotIn annotation,
Context context) |
boolean |
RegexStrategy.on(String object,
Regex regexValidate,
Context context) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
Validator.on(T object,
Context context)
校验对象
|
boolean |
Matcher.on(T object,
K annotation,
Context context)
校验对象
|
Copyright © 2019. All rights reserved.