Hi,
I am having issues with number type field validation.
The fields have a default value of 0, and they are required, but Kendo still shows an error message when the field is not empty.
This is my number field:
This is my js:
Ideally this should be valid even if the user doesn't touch it. Of course if he deletes the 0, or inputs a higher value than 100 then the error message should be displayed.
Please help me with this issue.
Best Wishes,
Matt
I am having issues with number type field validation.
The fields have a default value of 0, and they are required, but Kendo still shows an error message when the field is not empty.
This is my number field:
<
input
type
=
"number"
id
=
"someid"
name
=
"somename"
value
=
"0"
min
=
"0"
max
=
"100"
required
=
"required"
validationMessage
=
"This is a required field"
>
This is my js:
$(document).ready(
function
(){
$(
"form"
).kendoValidator({
rules: {
radio:
function
(input){
if
(input.filter(
"[type=radio]"
) && input.attr(
"required"
)) {
return
$(
".edit_filling"
).find(
"[data-qs="
+ input.attr(
"data-qs"
) +
"]"
).is(
":checked"
);
}
return
true
;
}
},
messages: {
radio:
"This field is required"
}
});
});
Ideally this should be valid even if the user doesn't touch it. Of course if he deletes the 0, or inputs a higher value than 100 then the error message should be displayed.
Please help me with this issue.
Best Wishes,
Matt