Class SimpleUrlValidator

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static UrlValidator getInstance()
      Gets a static instance to be used internal only.
      boolean isValid​(java.lang.String value)
      Checks if a field has a valid url address.
      boolean isValidDomain​(java.lang.String value)
      Checks if a field has a valid domain.
      • Methods inherited from class java.lang.Object

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

      • SimpleUrlValidator

        public SimpleUrlValidator()
    • Method Detail

      • getInstance

        public static UrlValidator getInstance()
        Gets a static instance to be used internal only.
        Returns:
        the instance
      • isValid

        public boolean isValid​(java.lang.String value)
        Description copied from interface: UrlValidator

        Checks if a field has a valid url address.

        Note that the method calls #isValidAuthority() which checks that the domain is valid.

        Specified by:
        isValid in interface UrlValidator
        Parameters:
        value - The value validation is being performed on. A null value is considered invalid.
        Returns:
        true if the url is valid.
      • isValidDomain

        public boolean isValidDomain​(java.lang.String value)
        Description copied from interface: UrlValidator

        Checks if a field has a valid domain.

        Specified by:
        isValidDomain in interface UrlValidator
        Parameters:
        value - the value
        Returns:
        true/false