You are using two grammars: the built in "digits" grammar and your own x-jsgf grammar. The "digits" grammar will accept all digits. To fix this, use only your own x-jsgf grammar.
Ah ok I see. I was thinking that I had to make my grammar of a specific type. But I guess it doesnt matter it is smart enough to take input as digits. But lets say I had a custom grammar and I wanted them to say
"Eight thousand two hundred and ten"
versus
"Eight"
"Two"
"One"
"Zero"
?
The current code that you have, once you remove the built-in digits grammar (type="digits"), that'll take care of the case where you want the user to say, "Eight thousand two hundred and ten".
The following code example can be used for the case where you want the user to say, "eight two one zero":