cancel
Showing results for 
Search instead for 
Did you mean: 

records[*] not working in regular expression protection policy in SAP API Management

0 Kudos

Hi Experts,

We are trying to implement RegularExpressionProtection policy to check for a JSON input(given below) for City field. records[0], records[1] and so on are working but records[*] is not working. Kindly help.

Input:

{ "records" : [{ "email":"test@test.com", "city" : "Hyderbad", "lastname":"Handerson", "company":"abcCompany" }, { "email":"abc@test.com", "city" : "kolkata", "lastname":"coop", "company":"123Company" }] }

RegularExpressionProtection Policy Code:

<JSONPath>

<Expression>$.records[*].city</Expression>

<Pattern>^([A-Za-z]{1}|[a-zA-Z]{4,})$</Pattern>

</JSONPath>

Thanks & Regards

Swetha

Accepted Solutions (0)

Answers (0)