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 trialSasha Lim
5,377 PointsTrue and False in Form Validation
Why is it that for the hints that show when the email is valid or invalid, the false value is what triggers the valid hint, and the true values is what triggers the invalid hint? I understand the adding and removing of the classes, but not why false = valid and true = invalid, by just the code written in the anon function written there.
Similarly, the latter part of the video, showing requiredFilledIn being true resulting in the submit button disabled also has me stumped.
1 Answer
Tom Mertz
15,254 PointsI think in later videos you are going to go back and replace true and false with expressions that make more sense. I'd say stick with it and it will probably make more sense in a bit.