The project is a validation management module written in Lua. It defines a ValidationManager object that handles validation of widgets in LuaRT desktop applications.
The project provides a modular and flexible way to manage validation in desktop applications. It allows easy addition of widgets and their corresponding validation rule, as well as applying the error message. Several validation managers can be used in one application.
- Create a folder called "ecluart" in your application.
- Copy the "vm.lua" file into this folder.
[application]
|
|----ecluart
| |
| |----vm.lua
| |----...
|
|----app.wlua
The validation manager (vm) can be loaded using the function require():
local vm = require("ecluart.vm") ValidationManager() -> objectInitializes a new validation manager instance.
ValidationManager:add(widget: object, property: string, rule: function, message: string) -> noneAdds a widget, widget property, validation rule and error message.
ValidationManager:validate() -> nonePerforms validation checks for each widget.
Copyright (c) 2023 by esferatec. It is open source, released under the MIT License. See full copyright notice in the LICENSE.md file.