validate default_order keys in the validator, refactoring of the to_polymorphic_order function