Add required option to field definitions

Like PR #55 but into dev branch