This commit is contained in:
zt
2025-03-19 10:42:50 +08:00
parent 00a99f8ccd
commit ef1841e256
14 changed files with 197 additions and 68 deletions

View File

@ -0,0 +1,19 @@
package com.ruoyi.common.util;
/**
* 校验工具类
* @author zhangqiao
* @since 2020/4/16 16:05
*/
public class ValidUtil {
public static boolean isValidIdentityCard(String identityCard) {
// 简单的身份证号校验逻辑,可以根据需要进行更复杂的校验
return identityCard != null && identityCard.matches("\\d{15}|\\d{18}");
}
public static boolean isValidBankCard(String bankCard) {
// 简单的银行卡号校验逻辑,可以根据需要进行更复杂的校验
return bankCard != null && bankCard.matches("\\d{16,19}");
}
}