Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 42df093

Browse files
committed
Added group "call" validator.
1 parent 1ce5f41 commit 42df093

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/resty/validation.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,9 @@ function group:requisites(r, n)
684684
end
685685
end
686686
end
687+
function group:call(func)
688+
self[#self+1] = func
689+
end
687690
function group:__call(data)
688691
local results = setmetatable({}, fields)
689692
local validators = self.validators

0 commit comments

Comments
 (0)