Add validate method for BodyParser