Merge pull request #9280 from govpf/feature/fix_datetime_validations

Fix datetime_champ validation with negative time zone
This commit is contained in:
LeSim 2023-08-02 13:14:19 +00:00 committed by GitHub
commit 441360a7f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 12 deletions

View file

@ -44,6 +44,6 @@ class Champs::DatetimeChamp < Champ
end
def valid_iso8601?
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}\+\d{2}:\d{2})?$/.match?(value)
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}[\+\-]\d{2}:\d{2})?$/.match?(value)
end
end