NULLABLE_CURRENCY_AMOUNT()function
NULLABLE_CURRENCY_AMOUNT(currency: CurrencyCode): NullableSchema<number>
| Param | Type | |
|---|---|---|
currency | CurrencyCode | ISO 4217 currency code that determines the step and symbol. required |
| Return | |
|---|---|
NullableSchema<number> | Schema that wraps a source schema and additionally allows null. |
| Throws | |
|---|---|
unknown | string if currency is not a valid ISO 4217 currency code. |
Create a NullableSchema for an optional monetary amount in a currency, or null.
Sugar factory for NullableSchema.
Examples
NULLABLE_CURRENCY_AMOUNT("GBP").validate(null) // null