Hey!
if i want to configure nested object like that
return {
fields = {
A = {
required = false,
type = "table",
schema = {
fields = {
X = { type = "array", required = true, func = check_for_value },
Y = { type = "string", required = true },
Z = { type = "boolean", required = false, default = false }
}
}
}
}
}
But i want that if A (required=false) is not given than the inner schema validation will not run
cause now if i dont put the ‘A’ field i still getting:
{
“config.A.X” : “X is required”,
“config.A.Y” : “Y is required”
“config.A” : [
“A.X is required”,
“A.Y is required”
],
}
And another question about schema.lua
where I can read more about self_check , questions like what is plugin_t, and is_update?
Thanks!