Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent invalid data to be silently accepted
When a user wants sets a ``Date`` or ``Datetime`` value and misses one of the fields (day, year, hour or minute) it is silently set to None without any 'input is not valid' error message being displayed. Unfortunately it can not be checked on a validator because the input value has already been converted to a ``datetime``. This commit works around it making sure an error is raised and only convert it to None if both *day* and *year* are left empty.
- Loading branch information
Showing
3 changed files
with
61 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters