Description
Count nonempty values, applying JavaScript trim first only when trimForPresence is true.
Identifier validation can involve several distinct questions: whether text has the expected shape, whether a checksum is consistent, and whether an authority actually assigned the identifier. Formatting and field extraction address narrower questions. Each result must be read according to the particular property the tool checks.
Count nonempty values, applying JavaScript trim first only when trimForPresence is true.
When to use this tool
Use Nonempty Exclusive Field Count when you need the particular shape, formatting, field, or checksum property as one explicit stage in an identifier workflow.
How to use the tool and how it works
- Enter values, trimForPresence. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read populatedCount, exactlyOne. Inspect exactlyOne before interpreting the associated values.
Count nonempty values, applying JavaScript trim first only when trimForPresence is true. Return populatedCount and exactlyOne when that count equals one.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| values | Values | Required. Array of Text; maximum UTF-16 length 8192.; maximum items 256. |
| trimForPresence | Trim For Presence | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| populatedCount | Populated Count | Required. Safe integer. |
| exactlyOne | Exactly One | Required. Boolean. |
{
"input": {
"values": [
"",
" A ",
""
],
"trimForPresence": true
},
"output": {
"populatedCount": 1,
"exactlyOne": true
}
} Limitations and assumptions
- Values are text fields and the rule tests presence rather than semantic validity. With trimming disabled, whitespace-only text is populated; no field is selected, cleared, or coerced.
- The field tables state structural bounds; the mechanics also specify cross-field constraints. Malformed inputs and unsupported domains cause errors. A successful false flag, empty branch value, or zero placeholder has the meaning stated above and is distinct from an input error.
Alternative or Complementary methods
Use a complete format and checksum validator when required, then consult the issuing registry or verification process for assignment and identity. Preserve meaningful leading zeros as text.
References
Similar or alternative tools
- Conditional Required Count Gap
Count active required fields, missing required fields, and present fields outside the active-required set.
- Validation: DOI Prefix Single Field Check
Check the commonly specified DOI registrant-prefix lexical shape only, without validating a suffix, registration or resolution.