Activity Forums Salesforce® Discussions How to restrict input to numbers only in inputText field visualforce

  • How to restrict input to numbers only in inputText field visualforce

  • Vikas Kumar

    Member
    February 15, 2017 at 2:31 pm

    Hi All,

    How to restrict input to numbers only in inputText field visualforce?

    Thanks

  • Kumar

    Member
    February 15, 2017 at 2:38 pm

    Hi Vikas,

    One way you could make this work is use <apex:input type="number" /> instead of apex:inputText.

    Otherwise, you could implement some javascript validation or send it back to your controller and do the validation in Apex.

Viewing 1 - 2 of 2 posts

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos