Validator is grayed out when configuring attributes
I want to limit the number of hours someone can enter in a custom duration field. As of 4.0.1 (which we have), this is supposed to be possible via the Eclipse UI. However, for some reason the option is grayed out. So is Default Value. I also tried Decimal for the type with the same results. I want to limit the selection to 24 hours max. Attribute Validation is enabled in preconditions.
One answer
You need to create Attribute Customizations for Default Value and Validators if you want to use them (there are no default one). Lots of good details here: https://jazz.net/library/article/1003/#validators
Now, the bad news for now is that according to this page: https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript an attribute of type Duration is not safely used via scripting (look for this section: Only values of the following attribute types can be safely read by and returned from scripts:). Per the example in the first article, this is doable if you can use a numeric type for the attribute.