neoremind / fluent-validator

A Java validation framework leveraging fluent interface style and JSR 303 specification
Apache License 2.0
1.02k stars 222 forks source link

com.baidu.unbiz.fluentvalidator.ValidationError#errorCode取值 #26

Closed ddacxhs closed 6 years ago

ddacxhs commented 7 years ago

fluent-validator框架支持Hibernate Validator,那我该在Hibernate内置注解中如何定义errorCode了,com.baidu.unbiz.fluentvalidator.ValidationError#errorCode取值

neoremind commented 7 years ago

目前只能使用HibernateSupportedValidator#setHibernateDefaultErrorCode(int hibernateDefaultErrorCode)设置一个全局一样的error code。error code是hibernate不支持的,由于Fluent Validator框架封装了hibernate却没有更改它,所以这部分feature暂时无法支持,如果你有好的想法欢迎贡献。