Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
persona
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hexang 息壤平台
persona
Commits
0a251baa
Commit
0a251baa
authored
13 years ago
by
Shane Tomlinson
Browse files
Options
Downloads
Patches
Plain Diff
Got a shorter version of the email RegExp from Gerv
issue #501
parent
37c3bbe2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
resources/static/dialog/resources/validation.js
+2
-3
2 additions, 3 deletions
resources/static/dialog/resources/validation.js
with
2 additions
and
3 deletions
resources/static/dialog/resources/validation.js
+
2
−
3
View file @
0a251baa
...
...
@@ -40,11 +40,10 @@ BrowserID.Validation = (function() {
bid
.
verifyEmail
=
function
(
address
)
{
// Original gotten from http://blog.gerv.net/2011/05/html5_email_address_regexp/
// changed the requirement that there must be a ldh-str because BrowserID
// is only used on internet based networks. Also modified to allow capital
// letters in the domain name.
// is only used on internet based networks.
var
parts
=
address
.
split
(
"
@
"
);
return
/^
[\w
.!#$%&'*+
\-/
=?
\^
`{|}~
]
+@
[
a-z
A-Z
\d
-
]
+
(\.[
a-z
A-Z
\d
-
]
+
)
+$/
.
test
(
address
)
return
/^
[\w
.!#$%&'*+
\-/
=?
\^
`{|}~
]
+@
[
a-z
\d
-
]
+
(\.[
a-z
\d
-
]
+
)
+$/
i
.
test
(
address
)
// total address allwed to be 254 bytes long
&&
address
.
length
<=
254
// local side only allowed to be 64 bytes long
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment