Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html>
<head>
<title>validEmail Example</title>
<meta charset="UTF-8">
<style type="text/css">
.error {
color:red;
Expand Down Expand Up @@ -35,6 +36,22 @@ <h1>Invalid</h1>

<h1>Valid</h1>

<p>
<input type="text" value="email-test@universal-acceptance-test.international">
</p>

<p>
<input type="text" value="email-test@universal-acceptance-test.icu">
</p>

<p>
<input type="text" value="อีเมลทดสอบ@ยูเอทดสอบ.ไทย">
</p>

<p>
<input type="text" value="อีเมลทดสอบ@ทีเอชนิค.องค์กร.ไทย">
</p>

<p>
<input type="text" value="andrew@chalkley.org">
</p>
Expand Down
2 changes: 1 addition & 1 deletion validEmail.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

function check($input) {
if($input.is("input,textarea")) {
var emailRegExp = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
var emailRegExp = /^[A-Z0-9ก-๛._%+\-]+@[A-Z0-9ก-๛.\-]+\.[A-Zก-๛]{2,}$/i;
return emailRegExp.test($input.val());
} else {
return false;
Expand Down