CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 ASP.NET Core RC2 validation summary shows custom but not model errors

Print topic Send  topic

Author Message
mrbean

Posts: 1
Posted: 06/09/2016, 10:52 PM

Hi there could you help me.

I've problem Asp-validation-summary in view shows errors added via ModelState.AddModelError, but don't show any model validation errors ("The User field is required."). I'm using Microsoft ASP.NET MVC Core 1.0. RC2 final hosted in asphostportal.com

//<div asp-validation-summary="ModelOnly" class="text-danger"></div> in view ModelState.AddModelError(string.Empty, "This error shows up in validation-summary"); ViewBag.HeaderMessage = "Error: " + string.Join(" - ", ModelState.Values.SelectMany(x => x.Errors).Select(x => x.ErrorMessage))

View profile  Send private message
3dtech

Posts: 2
Posted: 10/27/2016, 12:27 AM

<div asp-validation-summary="ModelOnly" class="text-danger"></div>

to

<div asp-validation-summary="All" class="text-danger"></div>

visit: http://vexmatech.com/samples.html
_________________
thanks.
visit: http://vexmatech.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.