5 Answers, 1 is accepted
Yes, the Data Annotation attributes can be used when the kendo.aspnetmvc JavaSript file is included. It will automatically convert the unobtrusive attributes to rules of the Validator. The currently supported attributes are Required, StringLength, RegularExpression and Range. The automatic validation for numbers and dates is also supported.
Kind regards,Daniel
the Telerik team
regards,
Daniel
I am not sure what is causing the problem with the messages display. Does the problem occur in the offline demos. If not, could you share a runnable sample?
In order to adjust the styles for the messages, you can add the styles to the elements with class "k-invalid-msg".
Daniel
the Telerik team
where can i find this class k-invalid-msg,can you show me also a small example with changing the position of the messages below?
Regards,
Daniel
There is not a configuration for the error messages in the Grid. You could override the margin using an important rule for the style e.g.
.k-invalid-msg
{
margin
:
0
!important
;
}
kendo.ui.Editable.prototype.options.errorTemplate =
'<div class="k-widget k-tooltip k-tooltip-validation" style="margin:0"><span class="k-icon k-warning"> </span>#=message#<div class="k-callout k-callout-n"></div></div>'
;
Kind regards,
Daniel
the Telerik team