Add context for mandatory fields

Fixes #1136