Javascript remove previous error message when formset is created


So I am creating a formset with Django and I do validation with clean_variable_name in my forms.py. My problem is when I add to create another form, it will give me the empty form with error message previous form generated. I would like to have reset error message.. I got JS file from the library,, I don't entirely understand the code. Can you also explain it to me if possible?



forms.py



HTML



JavaScript



This is the first picture on submit button it gives me the validation error message



This is the second form when I add another form the error message comes along on the second added form instead of just blank form






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

芜湖市第十一中学

曲波 (足球运动员)

巴尔喀什湖