Skip to content
Merged
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
3 changes: 3 additions & 0 deletions spec/type_aliases/email_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
'email@example.com (Joe Smith)',
'email@-example.com',
'email@example..com',
'random stuff multiline
valid@email.com
more random stuff $^*!',
'”(),:;<>[\]@example.com',
'just”not”right@example.com',
'this\ is"really"not\allowed@example.com'].each do |value|
Expand Down
2 changes: 1 addition & 1 deletion types/email.pp
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
type Stdlib::Email = Pattern[/^[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])?)*$/]
type Stdlib::Email = Pattern[/\A[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])?)*\z/]