Thanks,
Max
10 Answers, 1 is accepted
KendoUI Validator will automatically trigger validation only if it is hooked to a form element and the form is submitted. However, from the description you have given, it seems that the browsers's built-in validation is triggered (most probably in FireFox?). You may remove the FireFox built-in validation highlighting by overriding the appropriate CSS classes for example:
input:invalid, input:-moz-ui-valid {
box-shadow:
none
;
}
Additional information on styling the browsers built-in validation can be found on the net, for example here.Greetings,
Rosen
the Telerik team
Specifically, I'm validating if two fields are equal to one another, for password and password confirmation.
Could you provide a sample (using jsFiddle for example) test page in which the behavior can be observed.
Regards,Rosen
the Telerik team
For example, click in the first field, then click out of it, and a validation message appears.
I'm not sure if Brian is asking about the same thing but I am interested in turning that off.
You may prevent validation when input is blurred, by setting validateOnBlur option to false:
$(
"#div"
).kendoValidator({ validateOnBlur:
false
})
Greetings,
Rosen
the Telerik team
I have 2 scenarios across multiple grids in my application I'd like to implement it for:
- Some columns needs to have validateOnBlur set to false
- All fields need to have it set to false
Let me know if this would be better suited as its own thread, but it seemed sufficiently related.
Thanks!
I'm afraid that disabling the validation on blur is not supported.
Regards,Rosen
the Telerik team
In the grid's onEdit event function:
.Events(e =>
{
e.Edit("onItemGridEdit");
})
function onItemGridEdit(e) {
//if cell being edited is Description
if (e.container.context.firstChild.id == "Description") {
//turn off validation for this field (this time only)
e.sender.editable.validatable.validate = function ()
{ return true; };
e.sender.editable.validatable.validateInput = function (input)
{ return true; };
}
}
Hello,
Kendo validator has validateonblur configuration. It determines whether the validation will be triggered when element loses focus. The default value is true.
Here is a sample showing this approach: https://dojo.telerik.com/eViyozaG/2
I hope this helps.
Best Regards,
Misho
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Might be the wrong channel (apology for that) but its the only one I found which was somehow related. Since we use the @progress/kendo-angular-charts": "^6.0.1" is there something related to the kendo validator.
In general it has to do with this part of the code:
for (let property in options) { if (!inArray(property, state.excluded) && options.hasOwnProperty(property)) { const propValue = options[property]; if (isFunction(propValue)) { needsEval = true; if (!dryRun) { options[property] = valueOrDefault(propValue(context), defaults[property]); } } elseif (isObject(propValue)) { if (!dryRun) { state.defaults = defaults[property]; } state.depth++; needsEval = evalOptions(propValue, context, state, dryRun) || needsEval; state.depth--; } } }
FYI: The extra data which we have are observables, and somehow the logic in the code has a issue with that. What we wonder is why all of those properties are interpreted and why in such a way that you can't extend the object - for our use case we need that.
Since we have some logic which binds additional properties kendo chart checkes those properties and causes errors:
zone.js:218 Uncaught TypeError: Cannot read properties ofundefined (reading 'error')
at lift.js:13:1
at evalOptions (eval-options.js:22:55)
at evalOptions (eval-options.js:29:1)
at evalOptions (eval-options.js:29:1)
at evalOptions (eval-options.js:29:1)
at ScatterLineChart.evalPointOptions (scatter-chart.js:171:24)
at ScatterLineChart.createPoint (scatter-chart.js:210:1)
at ScatterLineChart.addValue (scatter-chart.js:108:1)
at ScatterLineChart.traverseDataPoints (scatter-chart.js:286:1)
at ScatterLineChart.render (scatter-chart.js:41:1)
TypeError: source.subscribe is not a function
at http://localhost:4200/vendor.js:794928:16
at http://localhost:4200/vendor.js:797878:28
at evalOptions (http://localhost:4200/vendor.js:208189:97)
at evalOptions (http://localhost:4200/vendor.js:208196:29)
at evalOptions (http://localhost:4200/vendor.js:208196:29)
at evalOptions (http://localhost:4200/vendor.js:208196:29)
at ScatterLineChart.evalPointOptions (http://localhost:4200/vendor.js:206514:76)
at ScatterLineChart.createPoint (http://localhost:4200/vendor.js:206553:29)
at ScatterLineChart.addValue (http://localhost:4200/vendor.js:206451:26)
at ScatterLineChart.traverseDataPoints (http://localhost:4200/vendor.js:206629:17)
Edited: Resolved the issues by adding content as the parent property so its excluded. Would be nice if we had a property called metaData so there are no conflicts.