联系人管理功能模块开发
This commit is contained in:
+5
-5
@@ -57,9 +57,9 @@ public class ValidUtil {
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
public static StringBuilder validateAll(Object object,Class<?>... groups){
|
||||
public static StringBuilder validateAll(Object object){
|
||||
StringBuilder msg = new StringBuilder();
|
||||
Set<ConstraintViolation<Object>> set = validatorAll.validate(object, Default.class);
|
||||
Set<ConstraintViolation<Object>> set = validatorAll.validate(object);
|
||||
if(set != null && set.size() >0 ){
|
||||
for(ConstraintViolation<Object> constraintViolation : set){
|
||||
// 这里循环获取错误信息,可以自定义格式
|
||||
@@ -76,10 +76,10 @@ public class ValidUtil {
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
public static StringBuilder validateExcel(Object object, int count,Class<?>... groups){
|
||||
public static StringBuilder validateExcel(Object object, int count){
|
||||
StringBuilder msg = new StringBuilder();
|
||||
Set<ConstraintViolation<Object>> set = validatorAll.validate(object, Default.class);
|
||||
if(set != null && set.size() >0 ){
|
||||
Set<ConstraintViolation<Object>> set = validatorAll.validate(object);
|
||||
if(set != null && set.size() > 0 ){
|
||||
for(ConstraintViolation<Object> constraintViolation : set){
|
||||
// 这里循环获取错误信息,可以自定义格式
|
||||
msg.append("第").append(count).append("行:").append(constraintViolation.getMessage()).append("</br>");
|
||||
|
||||
Reference in New Issue
Block a user