Only allow postitive numbers in text field
Only allow postitive numbers in text field
badbyte
Posts: 33Questions: 7Answers: 0
I have table with input fields which I'd only want to allow the user to enter positive integers. Is there a functionality to make input validation?!
This discussion has been closed.
Answers
Is this using Editor? If not, you can use
input
attributes - see here. If you are, try an event, either server-side or client-side (preSubmit
).Colin
I want the validation made on the browser side, and that should be made in form of events or as parameter passed to my datatable. I think that datatable doesn't have such a parameter?
Use the
input
attribute as Colin mentioned or if you want an event then you will need to create an event handler. If you aren't using Editor then you are responsible for handling theinput
as Datatables knows nothing about it. See this example for the recommended way to create events.Kevin