You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
If passing a \DateTimeInterface value to DateValidator and DateTimeValidator, by default it treats it as invalid.
This is ironic since DateTimeValidator actually uses the fact an instance of \DateTime was successfully created as a signal the value is valid.
How to reproduce
Pass a valid instance of \DateTimeInterface to either DateValidator or \DateTimeValidator, they will validate it as invalid.
Possible Solution
Allow \DateTimeInterface values as valid.
Additional context
Using some tools to read Excel files already converts the values in cells to \DateTimeInterface instances (based on Excel cell value format hints). Passing the to the validation process fails it since it's not a string.