Skip to content

TimeValidator: Accept input that has single-digit hours without a leading zero #135

@flauschzelle

Description

@flauschzelle

This would be a nice convenience feature to avoid users getting annoyed by (for example) "5:30" being rejected when "05:30" would be valid.

Would need

  • adjustments to the regexes defined in the TimeFormat Enum (e.g. r'([01]?[0-9]|2[0-3]):[0-5][0-9]' instead of r'([01][0-9]|2[0-3]):[0-5][0-9]')
  • and/or adding a leading zero in some cases before the end of the validation, or using something else instead of time.fromisoformat (because that requires double-digit hours).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovements to existing features or smaller new features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions