Question
Help to write a custom validation script
I have a form field that is a measurement entered as a character string.
The proper format is inches followed by eighths of an inch (i.e. 13 3/8).
I would like to validate that:
- the inches are a whole number between 1 and 30
- the numerator of the fraction is between 0 and 7
- the '/' exists
- and the denominator is 8
How would I write that in a custom validation script?
Thank you in advance for your help!
