diff --git a/src/lib/isMobilePhone.js b/src/lib/isMobilePhone.js index 154f6ead3..a8fe5df0e 100644 --- a/src/lib/isMobilePhone.js +++ b/src/lib/isMobilePhone.js @@ -2,6 +2,7 @@ import assertString from './util/assertString'; /* eslint-disable max-len */ const phones = { + 'am-AM': /^(\+?374|0)((10|[9|7][0-9])\d{6}$|[2-4]\d{7}$)/, 'ar-AE': /^((\+?971)|0)?5[024568]\d{7}$/, 'ar-BH': /^(\+?973)?(3|6)\d{7}$/, 'ar-DZ': /^(\+?213|0)(5|6|7)\d{8}$/, diff --git a/test/validators.js b/test/validators.js index 5721212d2..8a9e77569 100644 --- a/test/validators.js +++ b/test/validators.js @@ -3738,6 +3738,25 @@ describe('Validators', () => { it('should validate mobile phone number', () => { let fixtures = [ + { + locale: 'am-AM', + valid: [ + '+37410324123', + '+37422298765', + '+37431276521', + '022698763', + '37491987654', + '+37494567890', + ], + invalid: [ + '12345', + '+37411498855', + '+37411498123', + '05614988556', + '', + '37456789000', + ], + }, { locale: 'ar-AE', valid: [