+ Start a Discussion
nishad basha 7nishad basha 7 

Visualforce: apex:inputText - restrict input to numbers only

when i enter that mobile number that sholud be a number like that  but iam given text that showing error. How to solve the above scenario please give some ideas.
anand k 11anand k 11
Hi Nishad,

One way you could make this work is HTML5-ifying your Visualforce page and use <apex:input type="number" /> instead of apex:inputText.


This can be done easily with Javascript also.

Francisco RojasFrancisco Rojas
So much thanks anand k 11 you rocks, it was so f**king useful