Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- Iraq phone rule, removing special character `+`.

## [4.15.0] - 2022-02-23
### Changed
- Update deploy pipeline to use Jenkins.
Expand Down
4 changes: 2 additions & 2 deletions spec/countries/IRQ-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe 'Iraq', ->

it 'landline number', ->
# Arrange
number = "+964 1234567890"
number = "964 1234567890"

# Act
result = Phone.getPhoneInternational(number)
Expand All @@ -18,7 +18,7 @@ describe 'Iraq', ->
expect(result.countryNameAbbr).to.equal('IRQ')

it 'mobile number', ->
number = "+964 1234567890"
number = "964 1234567890"
result = Phone.getPhoneInternational(number)
expect(result.valid).to.be.true
expect(result.isMobile).to.be.true
Expand Down
2 changes: 1 addition & 1 deletion src/script/countries/IRQ.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Iraq
@countryName = "Iraq"
@countryNameAbbr = "IRQ"
@countryCode = '964'
@regex = /^(?:\+|)(?:964|)(?:0|)*\d{10}$/
@regex = /^(?:964|)(?:0|)*\d{10}$/
@optionalTrunkPrefix = '0'
@nationalNumberSeparator = ' '
@nationalDestinationCode = []
Expand Down