Legally, and as per the Industrial Disputes Act, an employer is supposed to give notice or pay notice pay in lieu of notice. However, there is no law that states an employee should give notice before leaving.
For an employee, it is more of a moral responsibility to inform their employer in advance of their departure. Even if there is a specific clause in the appointment order insisting that an employee must give notice or pay in lieu before leaving, arrangements are often made to waive this requirement. Many employers do demand notice pay from employees by threatening that no relieving order will be issued, PF forms will not be forwarded, and similar consequences. While the issuance of a service certificate and relieving order is the employer's right, the employer cannot withhold PF forms submitted by the employee.
I am confident that in India, no employer has ever taken legal action against an employee to recover notice pay.
Regards,
Madhu.T.K