chrismiles / EZForm

iOS form handling and validation library.
MIT License
284 stars 64 forks source link

fix for e-mail validation #48

Closed luiza-cicone closed 10 years ago

luiza-cicone commented 10 years ago

email validation accepted strings like "x@yz."

Updated the method with regular expression validation inspired by http://www.raywenderlich.com/30288/nsregularexpression-tutorial-and-cheat-sheet

chrismiles commented 10 years ago

Trouble is, there's no single technically correct regex for email address validation. "x@yz." is a technically valid email address, someone could have "admin@com.".

The provided validation is intentionally simple to validate any input that would technically match an email address as per RFC2822/RFC5322. Anything more restrictive is developer or business preference.

Cheers, Chris