on 07-03-2018 3:08 PM
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
User | Count |
---|---|
4 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.