Skip to content

Adding RegEx validation to @pattern or specific linting rule for RegEx. #4128

Open

Description

Clear and concise description of the problem

The typespec should add validation to @pattern or Azure specific linting rule for RegEx.

Recently we encountered an invalid regex expression.

The correct expression should be @pattern("^[^_\\W][\\w\\-._]{0,79}(?<![-.])$")

Checklist

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions