Browse Source
Update zapret-tpws.lua
fixed validation function
pull/429/head
NewUse
11 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
2 deletions
-
docs/compile/openwrt/package/zapret/luci-app-zapret-tpws/luasrc/model/cbi/zapret-tpws.lua
|
@ -8,8 +8,8 @@ function opt.validate(self, value) |
|
|
table.insert(words, word) |
|
|
table.insert(words, word) |
|
|
end |
|
|
end |
|
|
for _, word in ipairs(words) do |
|
|
for _, word in ipairs(words) do |
|
|
if not word:sub(1, 2) == "--" then |
|
|
if word:sub(1, 2) ~= "--" then |
|
|
return nil |
|
|
return nil, translate("The field value \"TPWS Options\" has incorrect format") |
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|
return value |
|
|
return value |
|
|