validation for id and type parameters in route