Skip to content

enhance day validation regex for date format #65

@GavinChenYan

Description

@GavinChenYan

“inputDate”: “2017-13-25",
error is
{ “error” : {“statusCode”:400,“code”:“ERR11004",“message”:“VALIDATOR_SCHEMA”,“description”:“Schema Validation Error - $.inputDate: does not match the date pattern ^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}$“} }

so, months validation is correct

for days we have this
“inputDate”: “2017-12-35",
java.time.format.DateTimeParseException: Text ‘2017-12-35’ could not be parsed: Invalid value for DayOfMonth (valid values 1 - 28/31): 35
this is thrown in API code
so swagger allows invalid day
doesn’t allow invalid month

It should have similar validation error as incorrect month

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions