Ampere's law is valid for a loop that is not circular. However, it should have some charge distribution in the area enclosed so as to have a constant electric field in the region and a non-zero magnetic field. Even if the loop defined does not have its own charge distribution but has electric influence of some other charge distribution, it can have some constant magnetic field ().