Request validation for null values

Hi, We are using request validation plugin for validating requests with regex patterns. What I observed that for null value in request body Kong is not recognizing regex pattern and it is throwing 400 bad request error.

“test_field”:{“pattern”:"\\x00+|^abc1234$"

Basically we want to allow test_field to pass validation even if it null or ‘abc1234’. Could you please suggest.


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ