Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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,

https://mdbootstrap.com/docs/jquery/forms/validation/#server-side - here you can see docs with Server side validation.

please, create a snippet showing your problem here: https://mdbootstrap.com/snippets/. I'll try to help you.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Opened

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