Hi there,
I have upgraded my MVC Web Application to 13.2.2055. After the upgrade, all the combos on my view are failing the Data Annotation validation and say they are required, even though none of their related fields in the Model have the [Required] tag.
This was working fine on version 101(0?) and 2012. What could the problem be?
Thanks
Deon
Thanks Nikolay. Using that approach, I've managed to stop the incorrect validation.
Regards
Hi, Deon.
You can try to overwrite and disable the rendered validation options, when the combo is bound, using the following code:
I hope this will help you. You also will be notified, when the bug is fixed.
Best regards, Nikolay Alipiev
Thanks Maya.
Is there any way i can override that value to false?
Hello Deon ,
The issues seems to be due to the MVC wrapper generating validatorOptions without such being set:
function() {$('#Combovalue').igCombo({ filterExprUrlKey: 'filter', validatorOptions: { requiredMessage: 'The Combovalue field is required.', required: true, errorLabel: 'Combovalue' }
…
The same does not reproduce with older versions.
I’ve logged this as a new development issue with number 161670 and I’ve also opened a private case for you with number: CAS-129939-C0G2V1.
You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.
Let me know if you have any questions.
Best Regards,
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://es.infragistics.com/support
Hi Nikolay,
Here is some sample code from the view (the labels and combos are in a table):
<td>@Html.Infragistics().ComboFor(m => m.CtStkRmID).ID("cboStkRm").DataSource(Model.StockRooms).DataSourceUrl(Url.Action("GetStockRoomsLOD")).ValueKey("ct_stk_rm_id").TextKey("ct_br_stk_rm_desc").Width("310px").LoadOnDemandSettings(load => load.Enabled(true).PageSize(25)).Virtualization(true).FilteringType(ComboFilteringType.Remote).AutoComplete(true).AllowCustomValue(false).DataBind().Render()</td>
Here is the sample code for that combo from the Model:
[Display(Name = "Branch & Stk Rm")]
public int CtStkRmID { get; set; }
All of them are broadly defined in the same manner.
I have Infragistics TextEditorFors on the same view that validate correctly.