Skip to content

Commit b379861

Browse files
committed
fix condominium_fiscal_code generator
the real length of a condominium fiscal_code is 11 and not 9: the first 7 numbers identify the condominium, the later 3 identify the office and the latest is the control character
1 parent 789251c commit b379861

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/faker/default/finance.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ def stock_market
9797
##
9898
# Returns a random condominium fiscal code.
9999
#
100-
# @param country [String] Two capital letter country code to use for the vat number.
100+
# @param country [String] Two capital letter country code to use for the condominium fiscal code number.
101101
# @return [String]
102102
#
103103
# @example
104-
# Faker::Finance.condominium_fiscal_code #=> "012345678"
104+
# Faker::Finance.condominium_fiscal_code #=> "01234567890"
105105
#
106106
# @faker.version next
107107
def condominium_fiscal_code(country: 'IT')

lib/locales/en/finance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ en:
4949
- /6771#########{5,6}L/
5050
- /6709#########{5,6}L/
5151
condominium_fiscal_code:
52-
IT: "#########"
52+
IT: "###########"
5353
vat_number:
5454
AT: "ATU########"
5555
AR: "AR###########"

0 commit comments

Comments
 (0)