Skip to content

Commit

Permalink
Updates email and zip code validation (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnuravi authored Aug 24, 2023
1 parent 4bfefd8 commit 59aafab
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ const ValidationAnswerTypeString = ({ item }: Props): JSX.Element => {
{
display: t('Email'),
code:
"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$",
".*@.+",
},
{
display: t('URL'),
code:
'^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?',
},
{ display: t('Zip code'),
{ display: t('US ZIP code'),
code: '^(000[1-9]|0[1-9][0-9][0-9]|[1-9][0-9][0-9][0-8])$'
},
];
Expand Down

0 comments on commit 59aafab

Please sign in to comment.