Description
Count true entries in selected and return valid when selectedCount equals nonnegative integer requiredExactly.
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 true entries in selected and return valid when selectedCount equals nonnegative integer requiredExactly.
When to use this tool
Use Exclusive Choice Cardinality 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 selected, requiredExactly. 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 selectedCount, valid. Inspect valid before interpreting the associated values.
Count true entries in selected and return valid when selectedCount equals nonnegative integer requiredExactly.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| selected | Selected | Required. Array of Boolean.; maximum items 256. |
| requiredExactly | Required Exactly | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| selectedCount | Selected Count | Required. Safe integer. |
| valid | Whether this tool’s particular check passes; does not imply broader identifier or protocol validity. | Required. Boolean. |
{
"input": {
"selected": [
true,
false,
true
],
"requiredExactly": 1
},
"output": {
"selectedCount": 2,
"valid": false
}
} Limitations and assumptions
- RequiredExactly may exceed list length and simply yield false. This checks supplied boolean cardinality, not mutual exclusivity of semantic choices or the validity of selected values.
- 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
- Nonempty Exclusive Field Count
Count nonempty values, applying JavaScript trim first only when trimForPresence is true.
- Ark Qualifier Leading Separator Check
Return valid when qualifier is empty or starts with slash or dot.