Logic in the canonicalize_and_validate method takes a number of unique code paths specific to individual trigger types. It may be more useful to define some Ruby hashes that contain a "schema", so that validation logic could be more normalized / handled generically.
So for instance, something like
I won't model them all out, but that should set the gist of things.
A full breakdown of all allowed values is in
This is also likely the best way to fix the bug where mutually exclusive trigger hash settings are currently ignored. For example, a schedule of 'once' will accept an every value of '1', even though its unused, and there a number of other such examples.