# Require Email for Contact Managers

**Type:** Apex trigger · **Difficulty:** Easy · **Object:** Contact · **Topics:** Contact, Before Trigger, Validation, addError

Practice this problem interactively (write and run your Apex trigger against realistic data): https://www.forcechallenges.com/problems/require-email-contact-managers

## Problem

Before a Contact is inserted or updated, require an Email when Title contains the word Manager. Contacts with other titles do not need an Email for this rule. Show a helpful error message.

## Constraints

Keep the trigger bulk-safe and put no SOQL or DML statements inside loops.

---
Source: ForceChallenges · last updated 2026-10-12
