Skip to content

Conversation

@nevans
Copy link
Collaborator

@nevans nevans commented Dec 10, 2025

A #coerce_{type} method is added to NumValidator for every corresponding #ensure_{type} method, but usable with numeric string input. A simple Regexp is used to ensure they are in the simple decimal format, as allowed by the IMAP grammar. Other string formats (e.g: 0xffff or 0001) are not legal in IMAP grammar and are intentionally unsupported here.

@nevans nevans changed the title 🏷️ Add coerce_{type} methods to NumValidator 🏷️ Add NumValidator.coerce_{type} methods Dec 10, 2025
@nevans nevans added the enhancement New feature or request label Dec 10, 2025
@nevans nevans merged commit e1edb9a into master Dec 10, 2025
32 checks passed
@nevans nevans deleted the num_validator-coerce branch December 10, 2025 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants