Expand my Community achievements bar.

Field validation patterns - how sophisticated ? -

Avatar

Level 4
While I was trying to figure out why the script for changing field appearances would work on the screen but not in the saved form (thanks to Paul for his help infiguring it out!), I ran across a web page which described how to use validation patterns that were more sophisticated than usual in that if the currency field was null, the usual .mandatory trap worked, but if a 0 was entered the field value was changed to "n/a" even though the field was a Numeric field. I unfortunately did not bookmark the page, but wondered (a) if anyone recollects a similar page or (b) has some ideas on how to achieve the same result?



Bill Bain

Atlanta
2 Replies

Avatar

Former Community Member
Bill:

It might have been this blog entry:

http://blogs.adobe.com/formfeed/2008/10/numeric_constraint_no_zeros_2.html



The answer is to use a picture clause such as:

zero{'n/a'}|num{$zzzz9.99}



John

Avatar

Level 4
Yup. That's it. Thanks. I bookmarked it since I have a use for this in the next revision of a form I'm working with.



Bill