Salesforce: Validation Rule to Control Number Field


To make sure that users do not key in any alphabet values to a field.



In some situation, you will need to choose text field type for your number field. For example, Contact_Id__c should be a number field. But if you choose the field type as Number, you will end up having result of ‘100,569,333’ as your Id.



To overcome this, you can choose to use text field type. However, you will need some validation to avoid users from adding in alphabet value. For example:


Contact Validation RUle