summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--acf/model/net.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/acf/model/net.lua b/acf/model/net.lua
index 725c543..0792383 100644
--- a/acf/model/net.lua
+++ b/acf/model/net.lua
@@ -65,7 +65,11 @@ function IPv6Address:validate(context, value)
short = true
elseif not string.match(comp, '^%x%x?%x?%x?$') then invalid() end
end
- if not short and #comps < 8 then invalid() end
+ if (
+ short and #comps == 3 and comps[2] == ''
+ ) or (not short and #comps < 8) then
+ invalid()
+ end
end