Community
Participate
Working Groups
Build Identifier: 20110916-0149 Will Smythe knows about this one. We discussed this a while ago in Amsterdam. At a customer project, we found out that some entities require complex validations, where some validations can only run when another validation succeeded. Also, some validations may not run at all depending on the source of the data... This can consume quite a lot of effort to get it right. So I wrote a little generator. As a developer: - You can specify which validation rules exist for a given entity. - For each rule, whether you want simple checks (required and nothing entered, range and length checks, etc.), evaluate an expression or you want to have some function called to do the work. - Rules can depend on each other: don’t run a given rule if some other check already failed. - You also specify which actions can occur on the entity, normally only create/update/delete, a few additional actions for some records. - For each action you specify which rules are applicable. The generator generates a function for each action. For update functions, it will do the validation only if the relevant attribute(s) were changed. (Unless you force the rule to be called at all times.) We're using this now to great succes at the customer project (using RBD8012) We use MVC and a custom validator to display the error messages on the widgets. As others may very well be struggling with similar issues, this could find a place in EDT. Currently, it is a Rich UI application which generates EGL code and an XML containing the definitions. The new functions in EDT may very well allow other ways to implement this. Reproducible: Always
Setting the target milestone to Future for bugs that won't be addressed in 0.8.2.