Class Valids


  • public class Valids
    extends java.lang.Object
    Valids
    Since:
    0.1
    Author:
    PARK Yong Seo
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String IS_MAIL
      mail check
      - not allow Top-Level Domain
      - not support unicode
    • Method Summary

      Modifier and Type Method Description
      static boolean isDate​(java.lang.String date, java.lang.String format)
      check date validation
      static boolean isMail​(java.lang.String mail, int maxLength)
      mail check
      - not allow Top-Level Domain
      - not support unicode
      static boolean isNotBlank​(java.lang.String... texts)
      all parameters is not blank
      static boolean isNotNull​(java.lang.Object... objs)
      all parameters is not null
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • IS_MAIL

        public static final java.lang.String IS_MAIL
        mail check
        - not allow Top-Level Domain
        - not support unicode
        See Also:
        Constant Field Values
    • Method Detail

      • isMail

        public static boolean isMail​(java.lang.String mail,
                                     int maxLength)
        mail check
        - not allow Top-Level Domain
        - not support unicode

        cautious:
        this function not requirements rfc spec
        - https://tools.ietf.org/html/rfc5321
        - https://tools.ietf.org/html/rfc5322

        For example
        rfc valid : abc@abc
        isMail not valid : abc@abc (Top-Level Domain)

        rfc5 valid : abc@saro.me
        isMail valid : abc@saro.me

        Parameters:
        mail - address
        maxLength - limit mail length
        Returns:
        is valid
      • isNotNull

        public static boolean isNotNull​(java.lang.Object... objs)
        all parameters is not null
        Parameters:
        objs -
        Returns:
      • isNotBlank

        public static boolean isNotBlank​(java.lang.String... texts)
        all parameters is not blank
        Parameters:
        texts -
        Returns:
      • isDate

        public static boolean isDate​(java.lang.String date,
                                     java.lang.String format)
        check date validation
        Parameters:
        date -
        format -
        Returns: