Question: how to create a validation rule in sharepoint?
Answer: In your app where you want to validate data entry, click the List Settings button on the List tab of the Ribbon.
Under General Settings, click the Validation Settings link.
Type a formula in the Formula text box. ... 
Enter a user message that you want to appear if the validation formula fails. ... 
Click the Save button.