0

I have created a form along with other fileds having validation and there is one field where it doesn't have the validationMessageFor but in validationSummary I am able to see the error for that field and model doesn't have the required property.

Siva
  • 1
  • 1
  • please post your model and view to get any response – Nagib Mahfuz Jun 29 '21 at 06:36
  • Below is the Model public int a_initID{ get; set; } public string a_inty{ get; set; } public string a_iniNat{get;set;} public stirng a_initName {get;set;} – Siva Jun 30 '21 at 04:52
  • @NagibMahfuz `using (Html.BeginForm("WorkFlow", "Work", FormMethod.Post, new { class = "form-horizontal", autocomplete = "off", id = "frmCr" })) { Html.AntiForgeryToken() Html.ValidationSummary() Html.TextBoxFor(x => x.a_initID, new { @class = "form-control" }) ` – Siva Jun 30 '21 at 04:59
  • @NagibMahfuz did you get anuything. – Siva Jul 04 '21 at 07:18

1 Answers1

0

Validation summary Is supposed to display all the error messages on the model irrespective of validationMessageFor usage in UI. The field might contain any other validations associated with it. Please post your model here.

  • Below is the Model public int a_initID{ get; set; } public string a_inty{ get; set; } public string a_iniNat{get;set;} public stirng a_initName {get;set;} – Siva Jun 30 '21 at 04:52
  • `using (Html.BeginForm("WorkFlow", "Work", FormMethod.Post, new { class = "form-horizontal", autocomplete = "off", id = "frmCr" })) { Html.AntiForgeryToken() Html.ValidationSummary() Html.TextBoxFor(x => x.a_initID, new { @class = "form-control" })` – Siva Jun 30 '21 at 05:00