Comparing version 2.3.11 to 2.3.12
@@ -73,3 +73,3 @@ "use strict"; | ||
allowDecimal: true, | ||
integerLimit: 15, | ||
integerLimit: 17, | ||
prefix: 'R$ ', | ||
@@ -104,3 +104,3 @@ suffix: '', | ||
allowDecimal: true, | ||
integerLimit: 15, | ||
integerLimit: 17, | ||
prefix: '', | ||
@@ -117,3 +117,3 @@ suffix: '' | ||
allowDecimal: true, | ||
integerLimit: 15, | ||
integerLimit: 17, | ||
prefix: '', | ||
@@ -120,0 +120,0 @@ }) |
@@ -291,3 +291,3 @@ "use strict"; | ||
} | ||
var regex = /^(R\$|R\$ )?(()-(\d{1,3})(?:.[0-9]{3}){0,1}|(\d{1})(?:.[0-9]{3}){0,2}|(\d{1,7}))(\,\d{1,2})?$/g; | ||
var regex = /^(R\$|R\$ )?(-)?(?!0(\.)?00)\d{1,3}((\.)?\d{3})*(,\d\d)?$/g; | ||
return regex.test(currency); | ||
@@ -294,0 +294,0 @@ } |
@@ -147,2 +147,3 @@ "use strict"; | ||
chai_1.expect(index_1.validateBr.currency('R$ 1234,10')).to.be.true; | ||
chai_1.expect(index_1.validateBr.currency('R$ 99.999.999,99')).to.be.true; | ||
chai_1.expect(index_1.validateBr.currency('R$ 1.234,10')).to.be.true; | ||
@@ -149,0 +150,0 @@ chai_1.expect(index_1.validateBr.currency('1234,56')).to.be.true; |
{ | ||
"name": "js-brasil", | ||
"version": "2.3.11", | ||
"version": "2.3.12", | ||
"description": "Javascript Utils para Brasil (cpf, cnpj...)", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -74,3 +74,3 @@ import { isArray, processCaretTraps, getSpecialProperty } from './utils'; | ||
allowDecimal: true, | ||
integerLimit: 15, | ||
integerLimit: 17, | ||
prefix: 'R$ ', | ||
@@ -105,3 +105,3 @@ suffix: '', | ||
allowDecimal: true, | ||
integerLimit: 15, | ||
integerLimit: 17, | ||
prefix: '', | ||
@@ -118,3 +118,3 @@ suffix: '' | ||
allowDecimal: true, | ||
integerLimit: 15, | ||
integerLimit: 17, | ||
prefix: '', | ||
@@ -121,0 +121,0 @@ // suffix: '%' |
@@ -337,3 +337,3 @@ import { getAllDigits, fillString, getAllWords } from './utils'; | ||
} | ||
const regex = /^(R\$|R\$ )?(()-(\d{1,3})(?:.[0-9]{3}){0,1}|(\d{1})(?:.[0-9]{3}){0,2}|(\d{1,7}))(\,\d{1,2})?$/g; | ||
const regex = /^(R\$|R\$ )?(-)?(?!0(\.)?00)\d{1,3}((\.)?\d{3})*(,\d\d)?$/g; | ||
return regex.test(currency); | ||
@@ -340,0 +340,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1481167
28287