What ever the formula we provide, it should return true or false. If it returns true, the validation is success and if false it is a failure and gives error message.
Some more examples of formulas so that we can get familiar with syntax
=EmpId>10 //Allows only EmpId greater than 10
=IF(EmpId>10,TRUE,FALSE) //Allows only EmpId greater than 10, same as above but with IF condition.
=AND(EmpId>5,EmpId<10) //Allow EmpId to be in the range between 5 and 10
=IF(LEN(EmpId)>5,TRUE,FALSE) //Allows EmpId length greater than 5 digits only
=[EmpId]<> 11 //Restricts users not to give EmpId as 11
=[JoiningDate] < TODAY() //If JoiningDate is the date column, JoiningDate should be less than todays date
=IF(Cost>([Sell Price]-(Cost*(10/100))),FALSE,TRUE) //validaion to set Selling price should always be 10% more than cost price
Note: SharePoint does not allow regular expressions in validation formulas.
You can refer this link for formula syntax
Url: http://adicodes.com/column-validations-and-list-validations-in-sharepoint-2010/