HTML input restrictions does not work??
HTML input restrictions does not work??
kaustubh.agrawal2000
Posts: 88Questions: 39Answers: 2
in Editor
I am trying input restrictions with my datatable editor .. but dont seem to be working..
attr: {
type: "number",
min : "1",
max : "10"
}
Although the number restriction is working fine.. but I am still able to input & post value > 10 ..
Am I missing something here ??
When I inspect the html, I can see the attributes properly.. but I am still able to post value > specified.
Is there a workaround ??
This discussion has been closed.
Answers
It looks like the
number
input
type element does restricted the numbers when using the arrows in the input, but not when you enter numbers via the keyboard: https://jsfiddle.net/pL0ny1ot/ .A validator on the server-side would be needed.
Allan