Checking for the presence of numbers in a string

Dear Macscripter,

In my application, users are required to enter a username which should contain at least one number (I would rather it were at least four but I can’t work that out). The code I have is as follows:

set usernamecheck to contents of text field "user" of window "options"
			if usernamecheck does not contain some item of {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"} then
				display dialog "Your username must contain at least one number!" with icon 2
--- does program stuff here
end if

I have a bit of a problem. This works about 50% of the time, with the user only being able to proceed when their username contains a number. However, the other 50% of the time, even if the user has a number in their username, it will still display the dialog, once, twice, or even three times after repeated clicking of the button, finally agreeing to see that it is wrong and letting the user proceed.

The system seems to work a bit better if you press return rather than clicking the button, and whether or not you use the drop-down menu which also features in the window before clicking the button also seems to have an effect, though this may be my imagination.

So I have two questions,

How can I get rid of this very irritating bug?
How can I alter my code to require at least four numbers?

I do hope somebody can help me.

Thank you

So obvious now that you pointed it out. Thank you very much.