The system design for validating a form component is very nice. Here are a couple of ideas to consider to enhance it:
-
Currently the $all edit rule only is called when there is a specific rule for a field. Not sure if that is on purpose or a defect. The example for $all edit rule in the Validating Data with DHTMLX Touch documentation will be never called on any field. (see lines starting around 6601 in debug source.)
-
Currently, the special evaluation key $obj is evaluated before any other rules. It might be useful to evaluate all the other rules before calling the $obj rule. That way simple rules like isNotEmpty can be done before the $obj rule.
Thanks,
Kris