Sorry about that. Maybe my question was not clear but I am looking for a way to not saved the wrongly key in form or if the data is duplicated. Currently what I am intend to do in my code is this. I have 2 fields: firstport and lastport. In these 2 fields, the format has to be int/int/int. As my formset is declared extra=3. There will be 3 rows of this 2 field appearing. So for example my first row will be 1/0/1 for first port and lastport 1/0/3. My 2nd row has 1/0/40 for firstport and 1/0/1 for last port. My 3rd row will have 1/0/1 for firstport and 1/0/3 for lastport. As u can see, my first row and 3rd row has the same thing. So i would like to remove one of the row. For now it its saving both 1st row and 3rd row under different id in the table. And as u can see for 2nd row, my firstport last value is 40 while my lastport last value is 1. I would also like to remove this instance as my firstport value is larger than lastport