Skip to content

Commit

Permalink
update email pattern for newer browser versions using v flag in regex…
Browse files Browse the repository at this point in the history
… patterns
  • Loading branch information
hkdobrev committed Jun 7, 2024
1 parent db7460d commit eb5c15a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/ProtocolForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export const ProtocolForm = () => {
required={true}
value={email}
autoComplete="email"
pattern="^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$"
pattern="[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~\-]+@[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*"
title="Въведете валиден имейл адрес"
placeholder="Имейл адрес"
onChange={(e) => setEmail(e.target.value)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ViolationForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export const ViolationForm = () => {
label="Имейл"
type="email"
autoComplete="email"
pattern="^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$"
pattern="[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~\-]+@[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*"
title="Въведете валиден имейл адрес"
register={register}
errors={errors}
Expand Down

0 comments on commit eb5c15a

Please sign in to comment.