plugin string E-Mail verify
Verifies that strings are in valid e-mail format.
hey bjoern, thank you for the contrib!
may i suggest 2 improovements?
1/ validate via root zones http://www.iana.org/domains/root/db/ (avoid locals, but only classic latin),
since firstname.lastname@example.org marked now as valid but it's not
email@example.com is valid
2/ let more flexible names
e.g. (firstname.lastname@example.org) now marked as not valid, but it is. i know, google not let to use signs, but some other services do, so _ and - sings should be welcome in the plug filters.
To be honest I merely copied the code found here and pasted it into a string-plugin-template.
The code uses a regular expression to parse the input and check if it adheres to a certain form/syntax. Nothing is really validated, "rus" just matches the pattern like "com" or "net" do. The regex only tests if the TLD part consists of at least of two and a maximum of 17 characters.
So the plugin is not named very aptly and maybe should rather be called IsWellformedEmail (String).
Concerning underscores, as far as I know they are allowed in mail-addresses, just not at the beginning of the string, therefore email@example.com is marked valid (wellformed) whereas firstname.lastname@example.org is not.
anonymous user login