I would just return undefined if we fail, but make sure the view model is checking and doesn't call the completion function if an invalid character is entered.