diff options
Diffstat (limited to 'acf2/model/model.lua')
-rw-r--r-- | acf2/model/model.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/acf2/model/model.lua b/acf2/model/model.lua index a7609b0..4140087 100644 --- a/acf2/model/model.lua +++ b/acf2/model/model.lua @@ -201,10 +201,8 @@ function M.Model:init(context) function mt.validate() for _, f in ipairs(_members(Field)) do - if f:editable() then - if mt.match(f.condition or {}) then f:validate_saved() - else f:_save() end - end + if mt.match(f.condition or {}) then f:validate_saved() + elseif f:editable() then f:_save() end end if self.validate then self:validate() end end |