Restrict type casting on request validation.