function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Akshay MenseAkshay Mense 

How to do address validation while creating the record

VinayVinay (Salesforce Developers) 
Can you elaborate more on this?

Thanks,
Akshay MenseAkshay Mense
I want to do address validation on the custom field 'Address' of object while creating new record in Salesforce.
Sunil Kumar Reddy Y 9Sunil Kumar Reddy Y 9
Hi Akshay, you can use Validation Rules to validate the fields and can restrict user to create record if the validation criteria doesn't meet.

Refer to below link for examples: 
https://help.salesforce.com/articleView?id=fields_useful_validation_formulas_account_address.htm&type=5 (https://help.salesforce.com/articleView?id=fields_useful_validation_formulas_account_address.htm&type=5)

Please mark this as best answer if it answered your question.
VinayVinay (Salesforce Developers) 
You can try below validation sample rule.
AND(
ISBLANK(Street ),
ISBLANK( State ),
ISBLANK( Country ),
ISBLANK( PostalCode ),
ISBLANK( City ))

https://help.salesforce.com/articleView?id=fields_useful_field_validation_formulas.htm&type=5

Thanks,