validatorjs / validator.js

String validation
MIT License
23.05k stars 2.3k forks source link

ISO8601 - UTC time offset #1883

Open s-nihal opened 2 years ago

s-nihal commented 2 years ago

Describe the bug According to ISO8601, the time offsets are from UTC. UTC offsets can range from -12:00 to +14:00

Based on the spec, the validator isISO8601 should return false for any timezone offset beyond that range. However, the validator is returning true for these values.

Examples Screenshot 2021-12-13 at 12 57 49 PM

Additional context Validator.js version: v13.7.0 Node.js version: v14.18.1 OS platform: macOS

ejgonzalez17 commented 2 years ago

Hi, I would like to work in this Issue .

rubiin commented 2 years ago

@ejgonzalez17 go ahead