Format phone numbers in CRM

Format phone numbers in CRM

 Hi all, 

How can I make sure that the number entered will only have 10 digits and if it is entered with a country code (starts with + sign) it will only have 13 digits. 
I also want to avoid that blank characters can be entered. 

Thanks for you help. 

Best Regards