How to put validation on decimal precision ?

HI All,

I have a text field which takes decimal values , i want to restrict(put validation) the field with precision of 22  which means user is allowed to enter 13 digits before decimal and 9 digits after decimal point  not more than that . Also, i want to store the value as it is (no round off) .

Please can somebody help me with this .

Thanks in advance.

  Discussion posts and replies are publicly visible