3 Answers, 1 is accepted
0
Hello John,
In order to set a custom messages you can use the approach illustrated in the example below:
For more information on defining and using custom messages please refer to this article.
Regards,
Viktor Tachev
Progress Telerik
In order to set a custom messages you can use the approach illustrated in the example below:
For more information on defining and using custom messages please refer to this article.
Regards,
Viktor Tachev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.
0
John
Top achievements
Rank 1
answered on 17 Jan 2018, 09:08 AM
i use the approach of creating model definitions and use them many times in datasources.
export var TALERTS_Model = kendo.data.Model.define({
id: 'ALERT_ID',
fields: {
'ALERT_ID': { type: 'number' },
'CLASS_NAME': { type: 'string', validation: { maxLength: 50, required: { message: 'this is required' } } },
'DESCRIPTION': { type: 'string', validation: { maxLength: 100 } },
'CATEGORY': { type: 'string', validation: { maxLength: 100 } },
}
});
the above is invalid because required accepts boolean only and not object.
kendo.d.ts
interface DataSourceSchemaModelFieldValidation {
required?: boolean;
min?: any;
max?: any;
minLength?: any;
maxLength?: any;
[rule: string]: any;
}
and is not the best solution to work with any data type when using typescript as when defining a model in datasource.
0
Accepted
Hi John,
Thank you for reporting the behavior to us. I have logged this and we will update the TypeScript definitions as soon as possible. Until then I can suggest modifying the Kendo typescript file locally so that there is no error when using custom messages.
As a token of gratitude for reporting this to us I have updated your Telerik points.
Regards,
Viktor Tachev
Progress Telerik
Thank you for reporting the behavior to us. I have logged this and we will update the TypeScript definitions as soon as possible. Until then I can suggest modifying the Kendo typescript file locally so that there is no error when using custom messages.
As a token of gratitude for reporting this to us I have updated your Telerik points.
Regards,
Viktor Tachev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.