Using the fact that the nonintegrable phase factor can reformulate the gauge theory in terms of path dependent vector potentials, the quantization condition for the nonintegrable phase is investigated. It is shown that the path-dependent formalism can provide compact description of the flux quantization and the charge quantization at the existence of a magnetic monopole. Moreover, the path-dependent formalism gives suggestions for searching of the quantized flux in different configurations and for other possible reasons of the charge quantization. As an example, the developed formalism is employed for a (1+1) dimensional world, showing the relationship between the fundamental unit of the charge and the fine structure constant for this world.