Skip to content

Commit

Permalink
feat(schema) uuid validates on empty fields
Browse files Browse the repository at this point in the history
Check if this is needed
  • Loading branch information
kikito committed Oct 3, 2018
1 parent ebea55e commit 5bc77cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kong/db/schema/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ Schema.validators = {
end,

uuid = function(value)
if value == "" then
return true
end
if #value ~= 36 then
return nil
end
Expand Down

0 comments on commit 5bc77cd

Please sign in to comment.