Hi,
I'm using a AutoComplete in my form (Grid Popup Editor template) and all the Validation works except that on the AutoComplete...(see Picture)
here is the Code for the AutoCompleteFor:
<
div
class
=
"form-group m-xs"
>
<
label
class
=
"col-sm-2 control-label"
>Postleitzahl:</
label
>
<
div
class
=
"col-sm-2"
>
@(Html.Kendo().AutoCompleteFor(m => m.Postleitzahl)
.DataTextField("Postleitzahl_ID")
.Filter(FilterType.StartsWith).MinLength(1)
.NoDataTemplate("Keine Postleitzahl gefunden")
.Suggest(true)
.Height(300)
.DataSource(source =>
{
source.Read(read =>
{
read.Action("Postleitzahl_Read", "Standorte")
.Data("onAdditionalData");
})
.ServerFiltering(true);
})
.Events(e => e
.Select("onPostleitzahlSelect")
))
@Html.ValidationMessageFor(model => model.Postleitzahl)
</
div
>
here the part of the model class:
[Required]
[StringLength(8)]
public
string
Postleitzahl {
get
;
set
; }
[Required]
[StringLength(65)]
public
string
Ort {
get
;
set
; }
[Required]
[StringLength(255)]