Added validation to prevent an invalid currency code from being set