Skip to content

Commit

Permalink
fix: do not add extra slashes to pattern
Browse files Browse the repository at this point in the history
fixes #983
  • Loading branch information
RomanHotsiy committed Jul 30, 2019
1 parent 2f75aa3 commit 70d1ee9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions demo/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -883,12 +883,12 @@ components:
as well as digits
format: password
minLength: 8
pattern: '(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])'
pattern: '/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/'
example: drowssaP123
phone:
description: User phone number in international format
type: string
pattern: '^\+(?:[0-9]-?){6,14}[0-9]$'
pattern: '/^\+(?:[0-9]-?){6,14}[0-9]$/'
example: +1-202-555-0192
nullable: true
userStatus:
Expand Down
8 changes: 0 additions & 8 deletions src/common-elements/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,6 @@ export const PatternLabel = styled(FieldLabel)`
&::after {
font-weight: bold;
}
&::before {
content: ' /';
}
&::after {
content: '/ ';
}
`;

export const ExampleValue = styled(FieldLabel)`
Expand Down

0 comments on commit 70d1ee9

Please sign in to comment.