The requirement is simple. List contains two columns. One column is a drop down with values "Approved" or "Rejected". Another column is Approved Date. If user selects drop down value as Approved, Approved Date should become mandatory.
The end result looks like this:
As you notice above, when the status is Approved and click on Save button, it prompts a custom message asking user to enter a date. This is achieved with absolutely no code! Here is how you can achieve it.
Go to List Settings, navigate to Validation Settings. Under Formula, enter the below code: