Skip to content

Commit cfbb194

Browse files
authored
fix(cat-voices): label (#2758)
1 parent 8312fd0 commit cfbb194

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

catalyst_voices/packages/internal/catalyst_voices_localization/lib/l10n/intl_en.arb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,6 +1387,15 @@
13871387
}
13881388
}
13891389
},
1390+
"errorValidationStringLengthOutOfExactRange": "The text should be {count} {count, plural, =0{characters} =1{character} other{characters}}.",
1391+
"@errorValidationStringLengthOutOfExactRange": {
1392+
"description": "Validation error when the user entered text is not matching the exact required length.",
1393+
"placeholders": {
1394+
"count": {
1395+
"type": "int"
1396+
}
1397+
}
1398+
},
13901399
"errorValidationListItemsBelowMin": "There should be at least {min} {min, plural, =0{items} =1{item} other{items}}.",
13911400
"@errorValidationListItemsBelowMin": {
13921401
"description": "Validation error when the user entered less than min items in the list.",

catalyst_voices/packages/internal/catalyst_voices_view_models/lib/src/document/validation/localized_document_validation_result.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ final class LocalizedDocumentStringOutOfRange extends LocalizedDocumentValidatio
129129
final max = range.max;
130130

131131
if (min != null && max != null) {
132-
return context.l10n.errorValidationStringLengthOutOfRange(min, max);
132+
return min == max
133+
? context.l10n.errorValidationStringLengthOutOfExactRange(min)
134+
: context.l10n.errorValidationStringLengthOutOfRange(min, max);
133135
} else if (min != null) {
134136
return context.l10n.errorValidationStringLengthBelowMin(min);
135137
} else if (max != null) {

0 commit comments

Comments
 (0)