pub fn total_digits(s: &str, expected: usize) -> Result<(), ValidateError>
Expand description
Helper method the get the total number of digits for a decimal string value.
ยงErrors
Returns ValidateError::InvalidDecimalValue
if the passed string is
not a valid decimal value, or ValidateError::TotalDigits
if it exceeds
the expected
amount or total digits.