Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

numeric validation

Hi

I have a input field with label MILES where it should accept only numeric values(like 12,145.345,0.3435...)can you please tell how to write validation for this

Thanks

Raju

replied

Hi,

Create this input type as integer and format it as per your requirement

Either create a dictionary type and specify the format

or else use the DecimalFormat

Ex:


DecimalFormat decimalFormat = new DecimalFormat( "#,###,###,##0.00" );
double val= 100.23297;
System.out.print(decimalFormat.format(val));

Regards

Ayyapparaj

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question