Intagram does not provide clear instructions on the phone number format for security codes.
What is recommended by other users is to make sure to add your countrys dialing code. Example: for Australia you would enter +61xxxxxxxxxx, in Canada or US it would be +1 followed by your phone number.
DO NOT ADD SPACES, BE SURE TO ADD THE +. Find out exactly what someone from outside your country needs to dial in order to text you.
Also, you could try to login to www.instagram.com from your phones browser and change something in your profile (NOT the username or password) and then logout. Usually, this validates your account and the need for verification goes away.