You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'Field definition API reference for IBuilderFieldProps, field types, operators, and validation metadata.',
1017
+
'Field definition API reference for IBuilderFieldProps, field types, operators, usageLimit, and validation metadata.',
1008
1018
searchText:
1009
-
'IBuilderFieldProps field label type value operators validation BOOLEAN TEXT DATE NUMBER STATEMENT LIST MULTI_LIST GROUP BuilderFieldOption BuilderFieldOptionsStatus IBuilderFieldOptionState INearestFieldMatch IBuilderFieldChange dynamic field options',
1019
+
'IBuilderFieldProps field label type value operators usageLimit validation BOOLEAN TEXT DATE NUMBER STATEMENT LIST MULTI_LIST GROUP BuilderFieldOption BuilderFieldOptionsStatus IBuilderFieldOptionState INearestFieldMatch IBuilderFieldChange dynamic field options',
<li><ItemTitle><InlineCode>type</InlineCode>:</ItemTitle> Required field type. This controls which widget and value semantics are used.</li>
1024
1039
<li><ItemTitle><InlineCode>value</InlineCode>:</ItemTitle> Optional default or backing field value metadata. For <InlineCode>LIST</InlineCode> and <InlineCode>MULTI_LIST</InlineCode>, this is the initial static option set.</li>
1025
1040
<li><ItemTitle><InlineCode>operators</InlineCode>:</ItemTitle> Optional operator whitelist. When omitted, the builder falls back to the default operators for the field type.</li>
1041
+
<li><ItemTitle><InlineCode>usageLimit</InlineCode>:</ItemTitle> Optional structural constraint that limits how many rules may use this field or its shared usage bucket.</li>
1026
1042
<li><ItemTitle><InlineCode>validation</InlineCode>:</ItemTitle> Optional validation config. The shape depends on field type.</li>
1027
1043
</List>
1044
+
<SectionTitle>usageLimit</SectionTitle>
1045
+
<List>
1046
+
<li><ItemTitle><InlineCode>max</InlineCode>:</ItemTitle> Required maximum number of matching rules allowed in the selected scope.</li>
1047
+
<li><ItemTitle><InlineCode>scope</InlineCode>:</ItemTitle> Optional. Defaults to <InlineCode>global</InlineCode>. Use <InlineCode>parent</InlineCode> to limit usage only within the same immediate parent group.</li>
1048
+
<li><ItemTitle><InlineCode>key</InlineCode>:</ItemTitle> Optional shared bucket identifier. When omitted, the builder uses the field's own <InlineCode>field</InlineCode> value.</li>
1049
+
<li><ItemTitle><InlineCode>message</InlineCode>:</ItemTitle> Optional custom validation message used when persisted or imported data exceeds the allowed limit.</li>
1050
+
</List>
1028
1051
<SectionTitle>Type notes</SectionTitle>
1029
1052
<List>
1030
1053
<li><ItemTitle><InlineCode>BOOLEAN</InlineCode> / <InlineCode>TEXT</InlineCode> / <InlineCode>DATE</InlineCode> / <InlineCode>NUMBER</InlineCode>:</ItemTitle> The standard scalar field families with built-in widget and validation behavior.</li>
'Built-in validation for fields and rules, validation rendering with showValidation, and custom validator integration.',
1711
+
'Built-in validation for fields and rules, structural usageLimit constraints, validation rendering with showValidation, and custom validator integration.',
<li><InlineCode>max</InlineCode> defines how many matching rules are allowed inside the selected scope.</li>
1744
+
<li><InlineCode>scope="global"</InlineCode> limits usage across the whole query tree.</li>
1745
+
<li><InlineCode>scope="parent"</InlineCode> limits usage only among sibling rules in the same immediate parent group.</li>
1746
+
<li><InlineCode>key</InlineCode> lets multiple different fields share the same quota bucket.</li>
1747
+
<li>Exhausted fields are disabled in the field selector, and the Add Rule button is disabled when no selectable fields remain in the current scope.</li>
1748
+
<li><InlineCode>showValidation</InlineCode> still surfaces an issue when data arrives in an already invalid state, such as external input or text mode edits.</li>
1749
+
</List>
1692
1750
<AlertBoxtitle="Custom validator"variant="info">
1693
1751
Use <InlineCode>validator</InlineCode> when validation depends on
1694
1752
multiple rules, external state, or rules that are not expressible in
1695
-
field-level validation config.
1753
+
field-level validation config or <InlineCode>usageLimit</InlineCode>.
0 commit comments