added support for required int fields
made checking required fields faster.
added extra test
added extra test
Merge pull request #2 from jaspervp/required

added support for required int fields