IsCurrency symbol validation error
See original GitHub issueHi devs,
I’m trying use BRL currency in @IsCurrency options, but when I use this setting the validator fails:
{
symbol: 'R$',
require_symbol: true,
allow_space_after_symbol: true,
symbol_after_digits: false,
allow_negatives: false,
parens_for_negatives: false,
negative_sign_before_digits: false,
negative_sign_after_digits: false,
allow_negative_sign_placeholder: false,
thousands_separator: '.',
decimal_separator: ',',
allow_decimal: true,
require_decimal: true,
digits_after_decimal: [2],
allow_space_after_digits: false,
}
Value: R$ 1.400,00
"statusCode": 400,
"message": [
"monthyMoneyGoal must be a currency"
],
"error": "Bad Request"
But changing symbol to $
it works:
{
symbol: 'R$',
require_symbol: true,
allow_space_after_symbol: true,
symbol_after_digits: false,
...
}
Value: $ 1.400,00
"statusCode": 200,
"message": [
"Successful update"
],
Changing symbol to $R
it unbelievably too works!
Why? Where is error?
PS: My app uses single quotes in Prettier Formatter
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Client Validation Error With Input Fields Containing Currency ...
The problem is when the form goes in edit mode,the client validation throws the following error since the input field contains the currency...
Read more >Client Validation Error With Input Fields Containing ... - MSDN
The problem is when the form goes in edit mode,the client validation throws the following error since the input field contains the currency...
Read more >Validation Errors Despite No Validation Rule?
The first validation error encountered was: Currency ISO Code: invalid currency code: ". " There are no validation rules on object! apex ...
Read more >Using multiple currency setup in SalesForce, an error ...
... an error message occurs when saving incident records: Validation Errors ... the error encountered was "currency ISO Code: invalid currency code: Euro"....
Read more >Required Error Codes for MX Validation - IBM
Invalid active or historic currency code. Sw.Stds.D00007, Invalid Currency Amount. Also, the number of fractional digits (or minor unit of currency) must comply ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@btd1337 now we have to update validato.js 😃 I will try release new version with updated dependencies soon.
Closing this as expired. If you still encounter this error please open a new issue with a minimal reproducible example showcasing your problem. The example should: