类 ValidatorUtils

java.lang.Object
dev.utils.common.validator.ValidatorUtils

public final class ValidatorUtils extends Object
detail: 校验工具类
作者:
Ttt
  • 方法详细资料

    • match

      public static boolean match(String regex, String input)
      通用匹配函数
      参数:
      regex - 正则表达式
      input - 待校验的字符串
      返回:
      true yes, false no
    • isNumber

      public static boolean isNumber(String str)
      检验数字
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isNumberDecimal

      public static boolean isNumberDecimal(String str)
      检验数字或包含小数点
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isLetter

      public static boolean isLetter(String str)
      判断字符串是不是全是字母
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isContainNumber

      public static boolean isContainNumber(String str)
      判断字符串是不是包含数字
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isNumberLetter

      public static boolean isNumberLetter(String str)
      判断字符串是不是只含字母和数字
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isSpec

      public static boolean isSpec(String str)
      检验特殊符号
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isWx

      public static boolean isWx(String str)
      检验微信号
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isRealName

      public static boolean isRealName(String str)
      检验真实姓名
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isNickName

      public static boolean isNickName(String str)
      校验昵称
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isUserName

      public static boolean isUserName(String str)
      校验用户名
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isPassword

      public static boolean isPassword(String str)
      校验密码
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isEmail

      public static boolean isEmail(String str)
      校验邮箱
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isUrl

      public static boolean isUrl(String str)
      校验 URL
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isIPAddress

      public static boolean isIPAddress(String str)
      校验 IP 地址
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isChinese

      public static boolean isChinese(String str)
      校验汉字 ( 无符号, 纯汉字 )
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isChineseAll

      public static boolean isChineseAll(String str)
      判断字符串是不是全是中文
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no
    • isContainChinese

      public static boolean isContainChinese(String str)
      判断字符串中包含中文、包括中文字符标点等
      参数:
      str - 待校验的字符串
      返回:
      true yes, false no