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
Ayyapparaj KV 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