Salesforce Features
Data Validation
Better Data for Better Decisions
- Capture the right information at the right time, every time
- Create transparency through clear enforcement of business policies
- Get better visibility of your business by improving the utility of your data
The exciting new data validation capability in Winter '07 helps you manage the quality and value of data in Salesforce, thereby driving better business decisions. The user-friendly rule editor uses the same formula language as in custom formula fields, allowing you to quickly implement sophisticated business rules without programming. Combined with the power of new workflow and approval capabilities in Winter '07, you can embed useful policies for sales methodology enforcement, discount approvals, expense management, and much more.
This feature is available in all Editions.
Training, Documentation, & Best Practices
- Release Notes (PDF)
- Getting Started with Validation Rules (Breeze)
- Steps to Successful Validation Rules (PDF)
- Useful Sample Validation Rules (PDF)
- New Feature Workshop (Live Virtual Classroom)
Feature Details
- Validation Formulas: Boolean (true/false) formulas can validate record data interactively when the user tries to save the information.
- Error Messages: You can define the error text you want to display to the user and choose the display location next to field or at the top of page. With the translation workbench, you can localize your error message in other languages.
- Make Fields Conditionally Required: Use the familiar and powerful Apex formula language to make fields conditionally required (e.g., based on opportunity stage) or implement record type or role-specific business rules.
- New Custom Field Properties: New Required and Unique custom field properties help you universally enforce your business rules and prevent duplicate values.
- Enforcement via UI and API: Data validation is enforced not just in the user interface but also through the import wizard and API to ensure data quality regardless of their sources.

23 Comments
December 13
I am really surprised that this will not be available in Team Edition. This is not a special feature, this should be available to everyone.
Tannic
December 15
Hi Tannic,
This is an error. Data Validation will be available in all editions.
We will update the site.
Regards,
Eric
December 15
This has now been updated - sorry for any confusion.
December 15
These only fire in the UI, correct? The API will not care about these rules?
December 15
They fire through the UI and API 8.0 and above. (Not through older versions of the API.) Note that they will also fire through Import Manager, Data Loader, and Web2x.
January 2
Looks like no way to validate the account name? For example, I have an account ABC Co. in the system, how to prevent user from creating another ABC Co. and save it?
This is what I have been expecting for...
January 5
Validation Rules do not give you a way to check for duplicate Account Names.
There is another new feature -- the Unique attribute on a custom field -- that allows you to prevent duplicate values in custom fields, but not in standard fields like Account Name.
January 8
Will validation rules be on the entire field - across all Record Types - or available to be used at a Record Type level. EG: I want to validate on the 2 letter abbr for state, but someone else does not - esp since our instance is used globally, and other countries may not have two letter abbrev for their Province/State....
January 9
Hi Jan,
Validation rules are defined per object, but you can create record type specific rules by referencing the $RecordType.Name field in the rule. So you can do the scenario you are describing.
January 15
Does anyone know if the current version of Excel Connector is API 8.0? I'd love to get data validation going through this tool. Thanks.
January 18
HI,
Wow just got the new '07 release this past week-end. The Validation Rules are FANTASTIC!!! I have already implemented rules in several areas, like Accounts (Address), Opportunities. The sample doc is amazingly helpful. I would like to suggest that you set up a common area on your web site where users can share and discuss the validation rules as they develop them or need help with them -- a self help area. Right now I am trying to figure out how to require a long text box have information in it if another checkbox field = true. I can't do this through field dependencies since one of the fields is text. Being able to discuss and get help from my fellow admins and/or find a validation rule already written similar would be a huge benefit to me and all your admins!
January 19
You might want to check out our Discussion Board tab on successforce.com. Many administrators post great questions and solutions there. You can also join another salesforce.com online community called Connect On Demand where you can easily connect with other admins that are just like you! Go to www.salesforce.com/connect/signup. I hope that helps a bit
February 21
I want to make a pick list value required after choosing a value from the stage. How do I make create a statement that is true if no value is selected.
March 1
I like the idea of the validation rules, but I'm a little wary of them. What happens with the Web to Lead interface?
Do my validiation rules get output as Javascript code to validate the form before it is submitted to Salesforce?
If not, what happens to the Lead when the form comes in with invalid data?
March 14
Is it possible to use Validation Rules to insure that only one person per organization is coded to a specific role? Example is Joe Smith is VP of Sales at Company X, make a conditionaly unique requirement so only ONE individual can have the position of VP of Sales at Company X.
March 14
Mark - validation rules are executed for Web to Lead. If any of the rules fail, the lead will not be inserted, and an email will be sent to the administrator. This is similar to the way other errors are handled with Web 2 Lead.
March 14
Jeff -- there is not a way that I'm aware of to enforce unique roles using validation rules. If this capability is important to you, I would suggest posting this idea on IdeaExchange.
March 28
Per Eric Bezar's commment above "you can create record type specific rules by referencing the $RecordType.Name field in the rule" - where would this go in a formula to make the rule specific to a record type/
April 2
Is data validation enforced when leads are converted?
April 3
Regarding lead conversion:
No, this is one scenario where validation rules are not executed.
April 20
I have created customized form fields and generated the code in web-to-lead. I'm using Dreamweaver to create the form and validate it before the information in sent to sales force. My problem is that the code for the fields look something like this - Company Name of service:
When the form is validated the user doesn't know which field needs to be completed since "00N50000001Mo2A" comes up. Any help would be appreciated - I'm new to using sales force, but I'm trying.
April 30
We have data from our website's "send me more info" pour into salesforce as a lead. Auto-spammers are filling in fields like "street" with hypertext.
I want to have a validation rule that will prevent a lead creation if the street field contains the word "href". Can't seem to figure out the boolean language to create this as a validation rule. Don't need to return an error message, just need to halt the data import.
May 4
I am trying to create within a custom field a validation rule that makes sure that when entered it is in a specific format. The
Format would be 07-0820_BAL,1
Where year dash month date underscore three characters comma number is the desired format. Any help out there on where I can do this