Loading

Restricted Input for Currency Fields in Lightning

Publish Date: Oct 13, 2022
Description
Currency fields in Classic accept a variety of inputs, including special characters such as $ and extra spaces.  During the Save transaction, these values are converted to a standard format.  Conversely, Lightning prevents the input of special characters and extra spaces.
Resolution
In the Lightning framework, Currency fields are considered to have an input type = 'number'.  This field type is bound by HTML5 standards, which consider the $ and spaces to be invalid input.  Instead, this type of field will only accept numerical input and subsequently formats the designated currency symbol, code, or name on Save.

Component Reference: Formatted Number
Component Attributes: Input  (see section for 'Number')
Knowledge Article Number

000381176

 
Loading
Salesforce Help | Article