I have a modal that has textboxes in it, and if a user did not input any details in the textbox, I want it to not save the record. I have a notiflix confirmation popup that will ask the user before they will save the record. The problem is if one of the textboxes has no details and I press save, it will show an error $(...).valid() is not a function
Here is my code
if ($('#insertmain').valid()){ //insertmain is the id of modal
References:
<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery-3.6.3.min.js"></script>
2
Answers
I have found my mistake. It seems I have a different jquery reference in Layout.cshtml and I just need to remove that. It works now but validate is always returning true even if I leave empty spaces on a textarea.
Try to add in this way as you are using valid function before jquery library