Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

validation message on page load why

$
0
0

Hi

Every time my page load I see validation message such as "Username is Required". Which I don't want to see until user click submit.

One thing I have done is to resolve this problem is 

if (!ModelState.IsValid)
{

ModelState.Clear();  // NOT SURE IS THIS THE RIGHT APPROCH

}

Note : I am uisng  <div asp-validation-summary="All" class="text-danger"></div>


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>