Skip to content

isMobilePhone with locale es-CU matches numbers of any length > 8 when the number starts with 5 #2196

@klaframboise

Description

@klaframboise

Describe the bug
isMobilePhone with locale es-CU matches any string that start with a 5 followed by at least 7 digits. This is because that locale's regex is missing the end of line matcher

Examples
Repl.it demo: https://replit.com/join/vcsakenqug-klaframboise1
Screenshot 2023-03-03 at 3 51 07 PM

Additional context
Validator.js version: 13.9.0
Node.js version: 18.12.1
OS platform: linux + macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions