Javascript Validation in XForms

Hi ,

i am pretty new to XForms...and its really amazing to enter the XForm World.But i struck up with an issue in my XForm...

i have a two fields in my XForm(namely Height and Weight) in which user has to enter.

Height is measured in centimeters and the database field is of decimal(5,1)...so i have to validate the input as decimal having length 5 and 1 number after decimal...

So pls help me to get out of this.

Thanks....very much appreciated..