go-playground / validator

:100:Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving
MIT License
16.41k stars 1.31k forks source link

Cron validator accepting non conform cron string #1130

Open github-charles-fraisse opened 1 year ago

github-charles-fraisse commented 1 year ago

Package version eg. v9, v10:

v10.14.1

Issue, Question or Enhancement:

Invalid string get accepted by the cron validator

Code sample, to showcase or reproduce:

This field describe the cron input requested by my API (using fiber).

    Cron string `json:"cron" validate:"required,cron"`

When sending the non valid "/15 " cron string to my API, the validator doesn't throw an error.