Closed semyon422 closed 2 years ago
Working solution for me is deleting this line and adding
validate.validate_functions.optional = function(input) return true, "" end
Good catch, fix is pushed and I'll try to get out a new version shortly.
You can work around the issue by ensuring that you create a new validations object for every call to validate (most likely on every request)
Here: https://github.com/leafo/lapis/blob/9208d1c440a23398efc32f9dd09c6a80f836313c/lapis/validate.lua#L94 If i have validation
{"some_flag", type = "boolean", optional = true}
and I validate it at least one time withsome_flag
that "exists" it becomes{"some_flag", type = "boolean"}
.