Marketto / codice-fiscale-utils

Utility to handle Italian Codice Fiscale
MIT License
25 stars 11 forks source link

Time Validation #22

Closed Marketto closed 5 years ago

Marketto commented 5 years ago

Environment:

Platform [X] nodeJs [ ] Web/Browser

Issue description: DateValidator.ISO8601_SHORT_DATE and DateValidator.ISO8601_DATE_TIME should not validate Date/Time/timezone without minutes

Steps to reproduce the problem:

  1. Import CodiceFiscaleUtils
  2. (new RegExp(`^(?:${CodiceFiscaleUtils.DateValidator.ISO8601_DATE_TIME})`)).test('1998-03-23T12+200');

Expected behavior Should not validate '1998-03-23T12+200'