Thanks!
My whiteboard functionality was deliberately kept as Anvil-independent as possible, so that it could be used in other contexts, like yours. (Or in Anvil’s server side, as well as the client/browser side.)
It’s also extremely open-ended. What you’re looking for is not only feasible, but deliberately easy for you to add.
Your own top-level expert would move any error messages it found into a list, kept under its own name in the whiteboard. The simplest way for you to do this would be to clone two whiteboard_core
functions that work together:
-
require_all
-
_stop_at_first_validation_failure
under their own, new (descriptive?) names. (report_all()
comes to mind.) Then customize your clones to work as desired.
Whatever invokes your expert can then do whatever it pleases with that list.
Procedurally, you may find that some early errors raise questions about later errors. For example, if the text can’t be converted to an integer, does it make any sense to check that the (non-existent) integer is in the range of legal values?
Probably not. In this case, you’ll probably build some mid-level experts, using a mix of report_all()
and require_all()
to prevent execution of those senseless tests.