Phone no in mail form

Kindly visit this link

herein if the user put any word in the phone number field it will not accept the same. I want to know how they make it and restricted the phone number field in such a way.

The form in question ( which I am going to make is here

please visit the contact page)

Waiting for some reply.