I want to validate the fields of the list item while adding/editing and stop the saving operation and provide the error information what the user made on that page itself.
For ex, if I want to prevent user not to leave few fields set before saving based on particular status of another field, I cannot make the field as mandatory.
Use PreSaveAction.
Add a javascript function named PreSaveAction to your page (it’s best if you are creating a custom List Template and can modify the aspx page that will be used as EditForm and NewForm, otherwise try the Content Editor Web Part or by modifying the Master Page) and do all your custom validation from there.
For example, I just used it on a project where we had three percent fields that had to equal 100%. I used the following javascript and it worked great: