You could convert ~input to an integer variable and check for a value greater than 0 and less than 10
Your compound condition cannot work correctly, as it checks whether the input variable contains every single one of the numbers you've specified, which it likely won't.
E.G. if your ~input variable value is "1", the statement "[~input] Does Not Contain '2'" will evaluate to True, as ~input does not contain "2".
You'd want to swap it to "AND", rather than "OR", if you want to have the command proceed if ~input contains any one of the numbers (and exit or it contains none of them).
That said, if you only have ten values, you could instead predefine those using a numeric range in a dynamic command section, rather than using wildcards, to make sure the speech recognition engine only recognizes the expected input.