+ 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);