fix(package): [validator] accept supported hostless URL schemes (#395)

This commit is contained in:
Yusuf Efe authored and GitHub committed 2026-10-22 10:31:04 +08:00
1 parent 9a8b67ac85
commit 9685357daf
2 files changed
+7 -2

No files matched your search

+5
View File
@@ -436,6 +436,11 @@ func TestIsUrl(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestIsUrl")
assert.Equal(true, IsUrl("mailto:user@example.com"))
assert.Equal(true, IsUrl("file:///tmp/file.txt"))
assert.Equal(true, IsUrl("data:text/plain,hello"))
assert.Equal(false, IsUrl("mailto:"))
assert.Equal(false, IsUrl("http:/path"))
tests := []struct {
input string