Update zapret-tpws.lua

fixed validation function
This commit is contained in:
NewUse 2024-09-27 17:30:11 +03:00 committed by GitHub
parent d73212a195
commit 1b07047f63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,8 +8,8 @@ function opt.validate(self, value)
table.insert(words, word)
end
for _, word in ipairs(words) do
if not word:sub(1, 2) == "--" then
return nil
if word:sub(1, 2) ~= "--" then
return nil, translate("The field value \"TPWS Options\" has incorrect format")
end
end
return value