Skip to content

[Bug]: e164 validation accepts invalid short phone numbers since v10.30.0 #1515

@labch

Description

@labch

What happened?

Since upgrading from v10.28.0 to v10.30.0, the e164 validation tag now accepts phone numbers that are not compliant with the ITU-T E.164 specification.

Example:

  • "123456" is now considered valid by the e164 validator in v10.30.0
  • The same value was correctly rejected in v10.28.0

Version

v10.30.0

Example Code

validate := validator.New()
err := validate.Var("123456", "e164")
if err != nil {
    // should return an error
}

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