This project is read-only.

Creating rules that return a warning

Jun 4, 2016 at 10:25 AM
Hi Guys,

Thanks a mil for the great work. I was wondering if it is possible to create a rule that will still return a valid result and a warning.

For example.

Lets say that we have an identification number associated to a client. IF the identification number is null or empty, i still want to pass the validation. But with a warning message to say that we have a missing identification number.

Is this possible using the Rules Engine?

Thanks a mil
Jun 5, 2016 at 12:37 AM
Hi Jurieen,

Thank for your email. Unfortunately, I don't support Rules Engine anymore.
I would suggest you create a wrapper class, within in it wrap 2 Rules Engines - one for Warnings and one for Errors.

Your wrapper can then expose a Validate method (create your own ValidationReport class) that would invoke the Warning and Error ruleengine in the background, and product a report with both Warnings and Validation error.