Ohm’s law is valid if V depends on I linearly.
Ohm’s law states that the voltage across a conductor is directly proportional to the current flowing through it, provided all physical conditions and temperature remain constant.
Current-voltage relationship can be written as,
V = IR
V = voltage
I = Current
R = Resistance