UrlValidatorImpl

Implements UrlValidator behavior in the SDAI validation layer.

Author

Dmitriy Moroz

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Provides the companion object singleton used by the SDAI validation layer.

Link copied to clipboard
private data class UrlParts(val host: String, val port: String?)

Carries UrlParts data through the SDAI validation layer.

Functions

Link copied to clipboard
open operator override fun invoke(input: String?): ValidationResult<UrlValidator.Error>

Executes the invoke step in the SDAI validation layer.

Link copied to clipboard
private fun isHostValid(host: String): Boolean

Executes the isHostValid step in the SDAI validation layer.

Link copied to clipboard
private fun isIpv4Valid(host: String): Boolean

Executes the isIpv4Valid step in the SDAI validation layer.

Link copied to clipboard
private fun isLocalhostUrl(url: String): Boolean

Executes the isLocalhostUrl step in the SDAI validation layer.

Link copied to clipboard
private fun isPortValid(url: String): Boolean

Executes the isPortValid step in the SDAI validation layer.

Link copied to clipboard
private fun isUrlValid(url: String): Boolean

Executes the isUrlValid step in the SDAI validation layer.

Link copied to clipboard

Executes the parseUrl step in the SDAI validation layer.