Hi Jyoti,
Please clarify by what you mean by "special characters". You could have a schema in your API definitions that could be used by a validate policy, and the schema does have a number of validation properties, including a pattern property where you would specify a regular expression, so if the name field has anything but alphabetic characters for example it would fail the validation policy. The only drawback is that the validate policy error messages you have no control over, so hopefully the error that is presented is "appropriate".
Specifically to the schema in your API definition, the DataPower Gateway supports an older draft of the JSON schema validation specification which can be reviewed at https://json-schema.org/draft-04/draft-fge-json-schema-validation-00
and in particular the pattern property https://json-schema.org/draft-04/draft-fge-json-schema-validation-00#rfc.section.5.2.3 would be where you would specify this regular expression. You could also specify minimum and maximum string lengths for example.
Best Regards,
Steve Linn
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
------------------------------