If "%" is pass then system doesn't receive it making List<Integer> productRating null, that passes all the validation and display all the relevant records.Link
Proposed Solution
Added a validation for null List<Integer> productRating so that user get the error message to add rating.
If we want to pass actual "%" then the correct way is passing %25. FYI system request that request.
Ripple Effect
Adding that check will change the non required productRating as it is a required field now.
Problem in Hand
How backend system will distinguished
CASE1: productRating = %
CASE2: (productRating not sent)
as for that system both are null.
Problem
If "%" is pass then system doesn't receive it making
List<Integer> productRating
null, that passes all the validation and display all the relevant records.LinkProposed Solution
Added a validation for null
List<Integer> productRating
so that user get the error message to add rating. If we want to pass actual "%" then the correct way is passing%25
. FYI system request that request.Ripple Effect
Adding that check will change the non required productRating as it is a required field now.
Problem in Hand
How backend system will distinguished CASE1: productRating = % CASE2: (productRating not sent) as for that system both are null.