feat:新增值联动和扩展覆盖属性
This commit is contained in:
parent
b1232fc112
commit
0aed9c613b
@ -1,6 +1,7 @@
|
||||
package com.flyfish.framework.beans.enums;
|
||||
|
||||
import com.flyfish.framework.beans.meta.BeanValidation;
|
||||
import com.flyfish.framework.validation.annotations.Phone;
|
||||
import com.flyfish.framework.validation.enums.PhoneType;
|
||||
import lombok.Getter;
|
||||
import org.hibernate.validator.constraints.Currency;
|
||||
@ -64,8 +65,8 @@ public enum ValidationCandidate {
|
||||
// 货币
|
||||
CURRENCY((annotation, validation) -> validation.setValidator("currency"), Currency.class),
|
||||
// 手机号
|
||||
PHONE(((annotation, validation) -> validation.setValidator("phone")
|
||||
.prop("type", annotation.getEnum("type", PhoneType.class).name().toLowerCase())));
|
||||
PHONE(((annotation, validation) -> validation.setValidator("phone").prop("type",
|
||||
annotation.getEnum("type", PhoneType.class).name().toLowerCase())), Phone.class);
|
||||
|
||||
private final BiConsumer<MergedAnnotation<?>, BeanValidation> mapper;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user