Interface UrlValidator

  • All Known Implementing Classes:
    SimpleUrlValidator

    public interface UrlValidator
    Define the behavior of an url validator.
    Since:
    5.2.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String BEAN_NAME
      Bean name.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      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.
    • Method Detail

      • isValid

        boolean isValid​(java.lang.String value)

        Checks if a field has a valid url address.

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

        Parameters:
        value - The value validation is being performed on. A null value is considered invalid.
        Returns:
        true if the url is valid.
      • isValidDomain

        boolean isValidDomain​(java.lang.String value)

        Checks if a field has a valid domain.

        Parameters:
        value - the value
        Returns:
        true/false