There are 4 ways of making the field mandatory are:-
- Page Layout:- Field can be made mandatory from the page layout when it needs to be made mandatory for a set of users
- Field Level Security:- Field can be made mandatory from the FLS when it needs to be made mandatory for all the users in the Organization and even from the API’s
- Validation Rule:- Field can be made mandatory from the Validation Rule when it needs to be made mandatory for user who is using the same Page layout used by other users
- Before Triggers: we can also make a field mandatory using before trigger
Salesforce.com recommends using the Page Layput option for making the field mandatory.