The first 2 calls to fromString are correct. However, the 3rd call (Url.fromString "https://g") generates a Just Url when it should be returning a Nothing.
I am no expert, but I do believe a valid URL requires a TLD.
I also validated this against npm's validator library. Code here
Example from
elm repl
The first 2 calls to
fromString
are correct. However, the 3rd call (Url.fromString "https://g"
) generates aJust Url
when it should be returning aNothing
.I am no expert, but I do believe a valid URL requires a TLD.
I also validated this against npm's
validator
library. Code here