CA API Gateway: Checking if a date is valid
search cancel

CA API Gateway: Checking if a date is valid

book

Article ID: 122934

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

Sometimes it may be necessary to perform date validation to confirm invalid data is not supplied.

For example, you may need to prevent bad data like February 52, 2018 from being sent.

Environment

Release:
Component: APIGTW

Resolution

The attached sample policy retrieves a data from a JSON Payload and validates it.
To test other values simply change the variable declaration on line 2.

This will also check for valid leap years. February 29, 2018 will fail where as February 29, 2020 will success as it is a valid leap year.

Attachments

1558536948166kb000122934.xml get_app