Validating last character regex talumpati ng mga dating pangulo

I'll include the code below, but you can run/fork it on Codepen.

HTML // Function: valid email address without regex function isvalidemail(email) { // Get email parts var email Parts = email.split('@'); // There must be exactly 2 parts if(email Parts.length !

I'm sure there's a few more things you can do to improve the quality.

A regex could obviously replace this entire function with roughly 5 lines of code if you're not picky.

"I'm interested in hearing how it could be improved" - With a regex.

I am more interested in hearing if the way I've structured the function and sections could be done better, as the exercise for me was more about writing well-structured Java Script and getting familiar with some of the built-in functions than about writing a perfect validator (which is also the reason I didn't use Regex).

// Function: valid email address without regex function is Valid Email(email) { // If no email or wrong value gets passed in (or nothing is passed in), immediately return false.

I'm trying to improve my Java Script (I'm usually a copy/paste guy but can do basic DOM stuff with j Query too), so I decided to try and make a function to validate an email address without using Regex.

The code seems to work, but I'm interested in hearing how it could be improved.

Last time I checked, they were primarily known to spread broken/wrong information.

validating last character regex-65validating last character regex-75validating last character regex-18

Please link to the nicely formatted and readable standard or for example the Mozilla docs instead.@Gus Russ89 - it is generally accepted that there is no better way to validate an e-mail than to actually send an e-mail, and get a response..... This comes up often: stackoverflow.com/questions/201323/… You can look up great references from Douglas Crockford on some Do's and Don'ts of Javascript to also improve your skills. You Tube will have many of his lectures for review.

Join our conversation (4 Comments).
Click Here To Leave Your Comment Validating last character regex.

Comments:

  1. 1
    Steve

    You can even find captures of cam shows if you look. I’m going to give you a rundown of my favorite cam sites and tell you what’s good about them. My Free – This is probably the best all-around site.

  2. 1
    Steve

    It’s Free to register, so what are you waiting for?

  3. 1
    Steve

    A new report says most Americans think online dating is a good way to meet people.

  4. 1
    Steve

    After two more dance hits, her third single, "Holiday," written and produced by Jellybean Benitez, became a pop as well as dance hit.1985: The years 19 were years of phenomenal success for Madonna on a number of fronts.

Leave a Reply

Your email address will not be published. Required fields are marked *