[4.1] Validation Factory Tweaks

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