Closed mstralka closed 3 years ago
Eureka's enum RegExprPattern.EmailAddress currently looks like this:
RegExprPattern.EmailAddress
^[_A-Za-z0-9-+]+(\\.[_A-Za-z0-9-+]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$
According to Valid Characters for Email Addresses: The Complete List, the username of an email address may contain apostrophes, question marks, exclamation points, and some other special characters:
I propose changing the email address regular expression to:
^[_A-Za-z0-9-+!?#$%'`*/=~^{}|]+(\\.[_A-Za-z0-9-+!?#$%'`*/=~^{}|]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$
Makes sense. Could you create a PR with this change and also updating ValidationsTests.swift by either updating testRuleEmail, or adding a new test with some simple validations?
ValidationsTests.swift
testRuleEmail
Eureka's enum
RegExprPattern.EmailAddress
currently looks like this:According to Valid Characters for Email Addresses: The Complete List, the username of an email address may contain apostrophes, question marks, exclamation points, and some other special characters:
I propose changing the email address regular expression to: