function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
smith indiasmith india 

how to compare inputtext value with numbers(0-9) ?

Best Answer chosen by Admin (Salesforce Developers) 
Suresh RaghuramSuresh Raghuram

convert string value into number then compare it

for example

 

your text field name is  myString__c

 

convert it to decimal, integer  which ever is allowed (check with the specif type)

Integer x;

 

x = Integer.Valueof(myString__C);