File tree 2 files changed +17
-4
lines changed
src/app/pages/archetypes/components/archetype-form
2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 391
391
"repositoryType" : " Repository type" ,
392
392
"review" : " Review" ,
393
393
"reviewedArchetype" : " Archetype reviewed" ,
394
-
395
394
"reviews" : " Reviews" ,
396
395
"reviewComments" : " Review comments" ,
397
396
"risk" : " Risk" ,
422
421
"suggestedAdoptionPlan" : " Suggested adoption plan" ,
423
422
"svnConfig" : " Subversion configuration" ,
424
423
"tableView" : " Table view" ,
424
+ "tag" : " Tag" ,
425
425
"tag(s)" : " Tag(s)" ,
426
426
"tagCount" : " Tag count" ,
427
427
"tagDeleted" : " Tag deleted" ,
446
446
"user" : " User" ,
447
447
"version" : " Version" ,
448
448
"workPriority" : " Work priority" ,
449
- "tag" : " Tag" ,
450
449
"YAMLTemplate" : " YAML template"
451
450
},
452
451
"titles" : {
479
478
"max" : " This field must be less than {{value}}." ,
480
479
"maxLength" : " This field must contain fewer than {{length}} characters." ,
481
480
"min" : " This field must be greater than {{value}}." ,
481
+ "minCount" : " At least one {{type}} must be selected." ,
482
+ "minCount_plural" : " At least {{count}} {{types}} must be selected." ,
482
483
"minLength" : " This field must contain at least {{length}} characters." ,
483
484
"minOneStakeholderOrGroupRequired" : " At least one stakeholder or stakeholder groups is required." ,
484
485
"required" : " This field is required."
Original file line number Diff line number Diff line change @@ -136,13 +136,25 @@ const ArchetypeForm: React.FC<ArchetypeFormProps> = ({
136
136
criteria : yup
137
137
. array ( )
138
138
. of ( yup . object ( { id : yup . number ( ) , name : yup . string ( ) } ) )
139
- . min ( 1 )
139
+ . min ( 1 , ( { min } ) =>
140
+ t ( "validation.minCount" , {
141
+ count : min ,
142
+ type : t ( "terms.tag" ) . toLocaleLowerCase ( ) ,
143
+ types : t ( "terms.tags" ) . toLocaleLowerCase ( ) ,
144
+ } )
145
+ )
140
146
. required ( t ( "validation.required" ) ) ,
141
147
142
148
tags : yup
143
149
. array ( )
144
150
. of ( yup . object ( { id : yup . number ( ) , name : yup . string ( ) } ) )
145
- . min ( 1 )
151
+ . min ( 1 , ( { min } ) =>
152
+ t ( "validation.minCount" , {
153
+ count : min ,
154
+ type : t ( "terms.tag" ) . toLocaleLowerCase ( ) ,
155
+ types : t ( "terms.tags" ) . toLocaleLowerCase ( ) ,
156
+ } )
157
+ )
146
158
. required ( t ( "validation.required" ) ) ,
147
159
148
160
stakeholders : yup
You can’t perform that action at this time.
0 commit comments