Validating forms in SharePoint (PreSaveAction)
There might be few ways of validating columns in SharePoint, specially the new OOTB feature in SharePoint 2010, however if you want to customise the validation to business needs, these are nor enough.
For example, I need to make only one of the two available fields mandatory. If either one of them is filled by the user, validation is passed, or user should be notified.
If you want to target particular List you can write something like this:
Instead of modifying OOTB forms (newform and editform), we should use "AdditionalPageHead" which is explained in THIS article.