0

In my ASP.Net Core application I need to use both validation (server site and client sid) in bootstrap modal form, I succeed to perform a server side validation but I fail with client side javascript validation.

I followed and tried everything mentioned in the following links with no luck:

I also add the required javascript files in the correct order:

<script src="js/jquery.min.js"></script>
<script src="js/jquery.validate.min.js"></script>
<script src="js/jquery.validate.unobtrusive.min.js"></script>
<script src="js/jquery.unobtrusive-ajax.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/site.js"></script>

I shared my sample project in Github-Repository, the project has no error and the server side validation works fine.

How can I correctly perform the client side validation?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Abdulsalam Elsharif
  • 4,773
  • 7
  • 32
  • 66

1 Answers1

0

I tested with your codes on github,the source of your script was not correct,I modified to

<script src="~/js/jquery.min.js"></script>
......

It works well on local right now:

enter image description here

Ruikai Feng
  • 6,823
  • 1
  • 2
  • 11
  • I changed the source of script but still get the server side validation, I put a break point in controller post method and when I hit save I go to this method. – Abdulsalam Elsharif Aug 09 '22 at 08:57