Skip to content

Adding a pattern for PhoneNumber in /verify #76

@maxl2287

Description

@maxl2287

Problem description
Currently the phoneNumber is not validated against a pattern.

Possible evolution

Add the following pattern to "phoneNumber":

pattern: '^\+?[0-9]{5,15}$'
    NumberVerificationRequestBody:
      type: object
      description: Payload to verify the phone number.
      minProperties: 1
      maxProperties: 1
      properties:
        phoneNumber:
          description: A phone number belonging to the user in **E.164 format (starting with country code)**. Optionally prefixed with '+'.
          type: string
          example: '+346661113334'
          pattern: '^\+?[0-9]{5,15}$'
      (...) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions