fix for isMobilePhone pt-BR locale by jhcaiafa · Pull Request #1964 · validatorjs/validator.js

Conversation

@jhcaiafa

fix(isMobilePhone): pt-BR locale

  • correct regex for pt-br phone numbers

  • changed tests for pt-BR mobile phone number validation

  • Removed valid number from invalid list of pt-br phones

  • Numbers with 9 digits, second digit being 1-9

  • Updated tests to check on pt-br phone numbers starting with 9 and followed by 1-9

  • Updated tests to comply with new phone numbers

Fix regex for pt-BR, now accepting number 1 after number 9 for mobile phone numbers
valid and invalid test values updated due fix on isMobilePhone.js for pt-BR

@codecov

rubiin

2 participants

@jhcaiafa @rubiin