[4.1] Validation Tweaks/Fixes

I noticed the `customAttributes` parameter was missed from the docblocks, and we are missing a touch of type hinting.