mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
- Simplified structure validation by re-exporting functions from structure_config and validate_structure modules for better maintainability. - Consolidated validation logic in validate.lua, delegating to validate_package module for clearer orchestration. - Introduced new quick guide functionalities including step management (add, remove, update, reset ordering) and media handling (thumbnail and video URL validation). - Added utility functions for URL validation and step creation, enhancing the quick guide's usability. - Established type definitions for steps and media states to improve code clarity and type safety. - Enhanced schema editor with new field and relation definitions, providing a more robust structure for database schema management.
22 lines
535 B
Lua
22 lines
535 B
Lua
local validate_step = require("validate_step")
|
|
|
|
--- Validate all steps
|
|
---@param steps Step[] Array of steps to validate
|
|
---@return AllStepsValidationResult Validation result for all steps
|
|
local function validate_all_steps(steps)
|
|
local allErrors = {}
|
|
local valid = true
|
|
|
|
for _, step in ipairs(steps) do
|
|
local result = validate_step(step)
|
|
if not result.valid then
|
|
valid = false
|
|
allErrors[step.id] = result.errors
|
|
end
|
|
end
|
|
|
|
return { valid = valid, errors = allErrors }
|
|
end
|
|
|
|
return validate_all_steps
|