com.github.fashionbrot.validated.test.CustomConstraintValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mars-validated Show documentation
Show all versions of mars-validated Show documentation
mars-validated 参数验证 https://github.com/fashionbrot/mars-validated
package com.github.fashionbrot.validated.test;
import com.github.fashionbrot.validated.constraint.ConstraintValidator;
public class CustomConstraintValidator implements ConstraintValidator {
@Override
public boolean isValid(Custom custom, Object var1) {
/**
* 自定义方法
*/
int min=custom.min();
/**
* valud
*/
System.out.println(var1);
/**
* return true 则验证成功 false 验证失败
*/
return true;
}
}