Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Neil Berriman
3,230 PointsSimple Email Validation Plugin code challenge help please..!
Open a new script tag and using the "validEmail" plugin, store in a variable "isValid" whether the email address in the text input is valid.
my code is this: var isValid = $("input").validEmail();
got a Bummer! The validEmail method wasn't called on input
Can anyone give me a clue please.
Neil
13 Answers
Peter G.
Courses Plus Student 5,806 PointsOkay so after a good hour of trying codes and debugging here is the code that I passed with.
<script type="text/javascript" src="validEmail.js"></script> <script type="text/javascript"> var isValid = $("input").validEmail(); $isValid: true; </script>
ivelin demirov
Courses Plus Student 682 Pointswhat is input ? a .class or #ID ?
Neil Berriman
3,230 PointsInput is the text field of the email address
Tom Mertz
15,254 Pointsthe 'input' HTML element specifically
Steven Prescott
19,206 PointsI don't think you added the script. Try this:
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="validEmail.js"></script>
<script>
var isValid = $("input").validEmail();
isValid:true; // variable declared only once as it is globally accessible.
</script>
If I solved your problem, please click "Best Answer"
Neil Berriman
3,230 PointsThis did not work I put in this code with the script tags:
var isValid = $("input").validEmail(); isValid:true;
got the same Bummer:Bummer! The validEmail method wasn't called on input
input is the text area, i thought .validEmail(); is calling the method of validEmail...?
Do you have any more thoughts on this....
Neil
Neil Berriman
3,230 PointsThis did not work I put in this code:
<script type="text/javascript" src="validEmail.js">
var isValid = $("input").validEmail(); isValid:true; </script>
got the same Bummer:Bummer! The validEmail method wasn't called on input
input is the text area, i thought .validEmail(); is calling the method of validEmail...?
Do you have any more thoughts on this....
Neil
Steven Prescott
19,206 PointsSomebody said changing "the = to : var isValid = $("input").validEmail(); var isValid :true;" worked. Try that on the code I pasted above. I'm on my Ipad right now but I will go through the challenge in a few minutes. If that works, please click Best Answer. :)
Neil Berriman
3,230 PointsTried the new code it does not work.
Still get the same bummer! validEmail method wasn't called on input
Thanks for all your help so far steven.
Steven Prescott
19,206 PointsI've withdrawn my code.
Tom Mertz
15,254 PointsI'm on this same code challenge objective 3 and when I complete it, It gives me an error that task 2 is now wrong, if I delete my objective 3 code, then task 2 is right again (changing no code with objective 2)
Any thoughts? <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="validEmail.js"></script> <script type="text/javascript"> var isValid = $("input").validEmail(); $("textarea").validEmail(on:"keyup", success:function(){}, failure:function(){}); </script>
Thanks.
Todd Nestor
10,689 PointsAnyone still having a problem with this code challenge, try refreshing the whole page and starting the challenge over.
I have a decent amount of experience with programming in the past so I was confused why I was having so many issues with such a simple task. I refreshed and started over and the second time around the exact same code that was failing before passed now, so give it a try.
Michael Norton
6,739 PointsIf your getting: "The validEmail method wasn't called on input", It's because the "true" parameter wasn't added to the .validEmail method, which in turn "calls" it on input.
<script> var isValid = $("input").validEmail(true); </script>
Michael Norton
6,739 Points.
Damian Nolan
4,547 PointsI actually just spent so long on this thinking I was wrong. And all it took was refreshing the page. My brain feels melted.
Alessandro Elkan
Courses Plus Student 7,447 Pointspage doesnt respond at all! treehouse fix this!!!!!!!!
Alessandro Elkan
Courses Plus Student 7,447 PointsKeep getting "Bummer! You're missing another script tag"