File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -377,6 +377,8 @@ describe("Matcher", () => {
377377 describe ( "when given a valid Email address" , ( ) => {
378378 it ( "creates a valid matcher" , ( ) => {
379379 expect ( email ( "hello@world.com" ) ) . to . be . an ( "object" )
380+ expect ( email ( "hello@world.com.au" ) ) . to . be . an ( "object" )
381+ expect ( email ( "hello@a.co" ) ) . to . be . an ( "object" )
380382 expect ( email ( ) ) . to . be . an ( "object" )
381383 } )
382384 } )
Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ import MatcherError from "../errors/matcherError"
1010// Note: The following regexes are Ruby formatted,
1111// so attempting to parse as JS without modification is probably not going to work as intended!
1212/* tslint:disable:max-line-length */
13- export const EMAIL_FORMAT =
14- "^[a-z0-9!#$%&'*+\\/=?^_‘{|}~-]+(?:\\.[a-z0-9!#$%&'*+\\/=?^_‘{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
13+ export const EMAIL_FORMAT = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$"
1514export const ISO8601_DATE_FORMAT =
1615 "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))?)$"
1716export const ISO8601_DATETIME_FORMAT =
You can’t perform that action at this time.
0 commit comments