DatePickerElement initial_date validation is incorrect #635
Labels
bug
M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented
Version: 2x
web-client
Milestone
Description
While trying to pass
initial_date
attribute toDatePickerElement
constructor, it raiseseven though you pass there correct date format, like "2020-03-08".
This happens because
initial_date_valid
for DatePickerElement uses incorrect regex for verifying date -r"\d{4}-[01][12]-[0123]\d"
.This regex only matches 01, 02, 11 and 12 months.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Reproducible in:
slackclient version: 2.2.0
python version: 3.7.0
OS version(s): MacOS Catalina Version 10.15.3
Steps to reproduce:
DatePickerElement
withaction_id
,placeholder
andinitial_date
attributes (month in initial_date should be from 03 to 10);to_dict()
method.Expected result:
Expected result is a dict object with action_id, initial_date, type and placeholder attributes.
Actual result:
SlackObjectFormationError
is being raised.Attachments:
The text was updated successfully, but these errors were encountered: