It's pretty easy to do number 1. use a regex ([0-9]*) and check if there is more than one group of matched values. If there is more than one group then you can either error it out or do some more sophisticated checking(i.e. 100 meal at 10:50pm, two numbers but easy to discern what the intent was) number two is a bit more difficult but still fairly easy.
Comments
It's pretty easy to do number 1. use a regex ([0-9]*) and check if there is more than one group of matched values. If there is more than one group then you can either error it out or do some more sophisticated checking(i.e. 100 meal at 10:50pm, two numbers but easy to discern what the intent was) number two is a bit more difficult but still fairly easy.