How to set a field as mandatory for one user and optional for another user

Hi,
In employee doctype I added a custom field , I want it to be a mandatory field for employee and optional field for HR Manager. How can I do this?

Hi @PranethaaVinoth,

Go to the customize form and set the condition in the “Mandatory Depends On”.

References:

Also, you can do this using a client script.

Thank You!