Merge pull request #9280 from govpf/feature/fix_datetime_validations
Fix datetime_champ validation with negative time zone
This commit is contained in:
commit
441360a7f4
6 changed files with 14 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue