How to apply regular protection policy for incoming request form params. In my request iam passing client id,username,password,client-secret and grant-type.
If any user can not add more than these fields.
How we can restrict this by using regular expression.
Can anyone please refer how to write regular expressions.
Regex over request.content would be one way to do this, but writing and testing a regex that could successfully do it would probably difficult for a regex beginner to understand.
For this specific use case, you may find it easier to simply read request.formparams.names inside a javascript policy and iterate through the results though.