I have to create this validation rule when Start= (start_new + start_old) >0 or is positive and End = (end_new + end_old) >0 or is positive then the validation error will raise that" Positive Strat and Positive End are not allowed in the conjunction",
But with my below code it is not checking the validation rule and allowing the positive start and positive end values in the conjunction.
my code in django form.py
for i in range(count):
start_new = int(self.data.get(f'applicationruntime_set-{i}-start_new') or 0)
start_old = int(self.data.get(f'applicationruntime_set-{i}-start_old') or 0)
end_new = int(self.data.get(f'applicationruntime_set-{i}-end_new') or 0)
end_old = int(self.data.get(f'applicationruntime_set-{i}-end_old') or 0)
if (start_new + start_old) > 0 and (end_new+end_old) > 0:
raise ValidationError(
f" Positive Start values and Positive End values are not allowed to be used in conjunction")