Topic: Validation Message is not showing from server side for Select list, but server validation message is showing on input fields and textarea

t.iqbal free asked 4 years ago

Expected behavior I want to show server validation message on select dropdown list

@Html.DropDownListFor(model => model.BeneficiaryModel.Nationality, ViewBag.Nationality as IEnumerable, "Select", htmlAttributes: new { @class = "mdb-select colorful-select dropdown-primary", searchable = "Search here.." }) @Html.LabelFor(model => model.BeneficiaryModel.Nationality, htmlAttributes: new { @class = "mdb-main-label" })

                                            @Html.ValidationMessageFor(model => model.BeneficiaryModel.Nationality, "", new { @class = "field-validation text-danger" })

Actual behavior

Resources (screenshots, code snippets etc.)

Mateusz Łubianka staff commented 4 years ago

Hi @t.iqbal, - here you can see docs with Server side validation.

please, create a snippet showing your problem here: I'll try to help you.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.11.0
  • Device: pc
  • Browser: google chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: No