handleSpace method

void handleSpace()

Replace a space in the number with the normalized form. If space is not a significant character (normally grouping) then it's just invalid. If it is the grouping character, then it's only valid if it's followed by a digit. e.g. '$12 345.00'

Implementation

void handleSpace() =>
    groupingIsNotASpaceOrElseItIsSpaceFollowedByADigit ? '' : invalidFormat();