Even so, the point still stands. If you really need autogenerated validation Javascript, it should be implemented in a separate module. Maybe it should have an interface to the data validator module, so that it could generate JS according to a validator object's rules, but it should
not be intermingled in the validator module's codebase and interface.
Makeshifts last the longest.