Hello!
Kendo Wizard always validates the step forms when navigating between them, even if you press "Previous".
This can be seen in the official sample here:
https://demos.telerik.com/kendo-ui/wizard/index
If you are on Step 2 and press "Previous", you are required to input all data before going back to Step 1.
How can I change this? I want to validate the current step form content only if you press "Next", and allow the user to go back without inserting data if he presses "Previous".
Thanks!
I'm trying to get the validation working on my form with kendovalidator
I'm using Telerik ver : 2019.2.619
$.validator.setDefaults({
ignore: ""
});
$(function () {
$("#form1").kendoValidator();
});
this shows validation messages correctly if values are empty eg:
issue is when an incorrect value is entered the message shows:
<div class="form-group row">
@Html.LabelFor(model => model.CountryCodeId, htmlAttributes: new { @class = "control-label col-md-2 required" })
<div class="col-md-10">
@(Html.Kendo().ComboBoxFor(m => m.CountryCodeId)
.Name("CountryCodeId")
.Placeholder(@Resources.Resources.CountryPlaceholder)
.DataTextField("Description")
.DataValueField("Id")
.Filter("contains")
.Suggest(true)
.DataSource(s => s.Read(r => r.Action("GetCountries", "Customer")).ServerFiltering(false))
.HtmlAttributes(new { style = "width:300px" })
)
@Html.ValidationMessageFor(model => model.CountryCodeId, "", new { @class = "text-danger" })
</div>
</div>
[Required(ErrorMessageResourceType = typeof(Resources.Resources), ErrorMessageResourceName = "CountryValidation")]
[Display(ResourceType = typeof(Resources.Resources), Name = "Country")]
public int? CountryCodeId { get; set; }
and if I enter a number the validation seems to pass, which it shouldn't
Validation should pass only if a country is selected from the combobox, entrering a numeric value or any other text which is not on the list should fail validation
How do I get default dataanotation message if an invalid entry is made?
Thanks
I'm trying to implement validation on he form , but having issues with radio button.
<div class="form-group row">
@Html.LabelFor(model => model.LanguageID, htmlAttributes: new { @class = "control-label col-md-2 required" })
<div class="col-md-10">
@(Html.Kendo().ComboBoxFor(m => m.LanguageID)
.Name("LanguageID")
.Placeholder(@Resources.Resources.LanguagePlaceholder)
.DataTextField("Description")
.DataValueField("Id")
.Filter("contains")
.Suggest(true)
.DataSource(s => s.Read(r => r.Action("GetLanguages", "Student")).ServerFiltering(false))
.HtmlAttributes(new { style = "width:300px" })
)
@Html.ValidationMessageFor(model => model.LanguageID, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group row">
@Html.LabelFor(model => model.WebsiteDisplay, htmlAttributes: new { @class = "control-label col-md-2 required" })
<div class="form-group k-radio-list">
<div class="checkbox">
@(Html.Kendo().RadioButtonFor(m => m.WebsiteDisplay).Label(@Resources.Resources.Yes).Value(true))
@(Html.Kendo().RadioButtonFor(m => m.WebsiteDisplay).Label(@Resources.Resources.No).Value(false))
@Html.ValidationMessageFor(model => model.WebsiteDisplay, "", new { @class = "text-danger" })
</div>
</div>
</div>
<script>
$(function () {
$("form").kendoValidator();
});
</script>
it does work for combobox and textboxes , but error is not displayed for radio button.
Am I missing something?
Hello,
Please guide me for change font-size , color or style of the invalid message (see at attahc image)
Thank you
Is there any way of formating a cell on incell editing and making sure that everytime the user leaves the cell, its value is in hh:mm format?
Similar to the editing custom editor example and the unit price column.
I tried the following but it did not make any difference. I am still able to pass whatever value I want.
... columns: [ { field: "time", title: "Time", width: "40px", attributes: {style: "text-align:left;"}, headerAttributes: {style: "text-align:left;"}, format: "{0:hh:mm}" }, ], ...
I am guessing I will have to combine both datasource validation and the format option in order to achieve what I want.
Thank you in advance,
Syian
OK SO this is a little hard to actually explain but- I have a multiselect with a datasource and validation rules, not unlike this demo here. For some reason, it's failing validation even though it has a value. What is going wrong/how can I fix it/what further details do I need to provide?
Thank you, I apologize for the poor explanation.
http://jsfiddle.net/qgw2mtcy/
We are trying to validate a grid has more than 1 row before the form submission is valid. For some reason the validation logic does not trigger the custom rule for the grid row count validation.
Hi,
I found a sample code to display one validation message for a group of radio buttons above the radio button group, but I am not able to display one message in validation summary. Please try code snippet below. You can see the validation message display 5 times in the summary. I just want one message in summary. Please help.
<div id="form">
<span class="k-invalid-msg" data-for="test"></span><br/>
Test 1<input type="radio" name="test" required /><br/>
Test 1<input type="radio" name="test" required /><br/>
Test 1<input type="radio" name="test" required /><br/>
Test 1<input type="radio" name="test" required /><br/>
Test 1<input type="radio" name="test" required /><br/>
<button id="post">Post</button>
<div id="step3-validation-summary">
</div>
</div>
<script>
$(function(){
var validator = $("#form").kendoValidator({
rules: {
radio: function(input) {
if (input.filter("[type=radio]") && input.attr("required")) {
return $("#form").find("[type=radio][name=" + input.attr("name") + "]").is(":checked");
}
return true;
}
},
messages: {
radio: "This is a required field"
},
validationSummary: {
container: "#step3-validation-summary"
}
}).getKendoValidator();
$("#post").click(function() {
validator.validate();
});
});
</script>
Thanks,
Wesley