Skip to content

Commit

Permalink
Add pattern for currency
Browse files Browse the repository at this point in the history
  • Loading branch information
kangaree committed Dec 6, 2024
1 parent 70a2066 commit 5999837
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions playbook/app/pb_kits/playbook/pb_text_input/_text_input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
maximumFractionDigits: 2,
}).format(numericValue);
},
// eslint-disable-next-line no-useless-escape
pattern: '^\$\d{1,3}(?:,\d{3})*(?:\.\d{2})?$',
placeholder: '$0.00',
},
zipCode: {
Expand Down

0 comments on commit 5999837

Please sign in to comment.