I'm using @Html.ValidationSummary(true) and
@using (Html.BeginForm("testaction", "test", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form", id = "frmtest", autocomplete = "off" }))
{
<input id="btnFrmtest" type="submit" value="Log in" />
}
My form contain two fields UserName and Password when user click on "Log in" button without entering anything than its will throw below error
"Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'self' blob: data:". Either the 'unsafe-inline' keyword, a hash ('sha256-aqNNdDLnnrDOnTNdkJpYlAxKVJtLt9CtFLklmInuUAE='), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present. Note also that 'style-src' was not explicitly set, so 'default-src' is used as a fallback."
On server side I have checked
if (ModelState.IsValid)
{
//do somthing...
}
How can I resolved above error.