Hi Carlo,
Thanks for using the Syncfusion products.
We can provide the localization support for a validation message based in any language. We have to use localization script file in the Layout page for each language.
<head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <title>@ViewBag.Title</title> <link rel='nofollow' href="/Content/ej.widgets.core.min.css" rel="stylesheet" /> <link rel='nofollow' href="/Content/ej.theme.min.css" rel="stylesheet" /> <link rel='nofollow' href="/Content/Site.css" rel="stylesheet" /> <script src="/Scripts/jquery-1.10.2.min.js" ></script> <script src="/Scripts/jquery.easing-1.3.js"></script> <script src="/Scripts/jquery.globalize.min.js" ></script> <script src="/Scripts/jsrender.min.js" ></script> // Validation script file <script src="~/Scripts/jquery.validate.min.js"></script> <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script> <script src="/Scripts/globalize.culture.de-DE.min.js"></script> <script src="/Scripts/globalize.culture.es-ES.min.js"></script> <script src="~/Scripts/globalize.culture.it-IT.min.js"></script> // Italian Locale script file <script src="~/Scripts/messages_it.js"></script> <script src="/Scripts/ej.web.all.min.js"></script> <script src="/Scripts/ej.unobtrusive.min.js"></script> </head> |
We can set validation rule by using ValidationRules property for specific columns.
@(Html.EJ().Grid<object>("Grid") // Locale language .Locale("it-IT") .Columns(col => { . . . . . . .. // Validation rules col.Field("ShipCity").HeaderText("Ship City").ValidationRules(v => v.AddRule("required", true).AddRule("minlength", 3)).Width(90).Add(); . . . . . . . . . })) |
Please refer to the following link for other languages localization reference,
https://github.com/jzaefferer/jquery-validation/tree/master/src/localization
Download the sample from the following location:
http://www.syncfusion.com/downloads/support/forum/120100/ze/Grid_localization1087583201
Please try the above sample and let us know if it helps. If we misunderstood your query, please provide clear information regarding your requirements. It will help to provide a prompt solution.
Regards,
Isuriya R