Skip to content

Commit

Permalink
bug/WP-327: Broken email regex (#251)
Browse files Browse the repository at this point in the history
* Escape '-' character in regex character fields on exception + extension forms

* Convert username + email fields to input fields + add regex pattern for email validation
  • Loading branch information
edmondsgarrett authored Nov 13, 2023
1 parent faec59f commit 0eb77f8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h4>Acknowledgment of Terms</h4>
<div class="field-errors" style="display: none"></div>

<input type="email" name="requestor-email" required class="emailinput" autocomplete="email"
id="requestor-email" pattern="^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[a-z]{2,4}$"/>
id="requestor-email" pattern="^[A-Za-z0-9._%+\-]+@[A-Za-z0-9.\-]+\.[a-z]{2,4}$"/>
</div>
</div>
<div class="field-wrapper textinput required"><label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ <h4>Acknowledgment of Terms</h4>
<div class="field-errors" style="display: none"></div>

<input type="email" name="requestor-email" required class="emailinput" autocomplete="email"
id="requestor-email" pattern="^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[a-z]{2,4}$" />
id="requestor-email" pattern="^[A-Za-z0-9._%+\-]+@[A-Za-z0-9.\-]+\.[a-z]{2,4}$" />
</div>
</div>
<div class="field-wrapper textinput required"><label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ <h4>Acknowledgment of Terms</h4>
<div class="field-errors" style="display: none"></div>

<input type="email" name="requestor-email" required class="emailinput" autocomplete="email"
id="requestor-email" pattern="^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[a-z]{2,4}$" />
id="requestor-email" pattern="^[A-Za-z0-9._%+\-]+@[A-Za-z0-9.\-]+\.[a-z]{2,4}$" />
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ <h4 class="modal-header">Edit Selected User</h4>
</label>

<div class="field-errors" style="display: none"></div>
<textarea name="user_name" cols="40" rows="1" class="textinput" type="text" id="name"
minlength="2" maxlength="200">{{r.user_name}}</textarea>
<input name="user_name" class="textinput" type="text" id="name"
value='{{r.user_name}}' required></textarea>

</div>
<div class="field-wrapper text required">
Expand All @@ -37,8 +37,9 @@ <h4 class="modal-header">Edit Selected User</h4>
</label>

<div class="field-errors" style="display: none"></div>
<textarea name="user_email" cols="40" rows="1" class="textinput" type="text" id="email"
minlength="2" maxlength="200">{{r.user_email}}</textarea>
<input name="user_email" class="textinput" type="email" id="email"
pattern="^[A-Za-z0-9._%+\-]+@[A-Za-z0-9.\-]+\.[a-z]{2,4}$" value='{{r.user_email}}' required
>

</div>

Expand Down

0 comments on commit 0eb77f8

Please sign in to comment.