Roman numerals: add validation
Roman numerals: add validation: a task in smol-software-harbor (Harbor dataset). from roman accepts malformed numerals such as IIII , VV , IC , XM , VX or MMMM and returns some number for them. Make it return None for anything that is not the standard form of a number from 1 to 3999 (the form to…
The task
`from_roman` accepts malformed numerals such as `IIII`, `VV`, `IC`, `XM`, `VX` or `MMMM` and returns some number for them. Make it return `None` for anything that is not the standard form of a number from 1 to 3999 (the form `to_roman` produces); valid numerals keep working. Run `cargo test --offline -q`.
Part of efederici/smol-software-harbor.