How would I go about checking if a value submitted in a text field is a number?

I have a field, and it must only contain numbers.

I already have a way of to check fields on submitted, I just don't know how to check if it's a number specifically.