Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Help to write a custom validation script

New Here ,
Jan 20, 2025 Jan 20, 2025

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:

  1. the inches are a whole number between 1 and 30
  2. the numerator of the fraction is between 0 and 7
  3. the '/' exists
  4. and the denominator is 8

 

How would I write that in a custom validation script?

Thank you in advance for your help!

 

TOPICS
How to , PDF forms
111
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 21, 2025 Jan 21, 2025
LATEST

I would strongly recommend using two text fields for this, one for the inches and another for the numerator of the fraction. The rest should be static text. It will make validating the user input much easier.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines