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!
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

Jenny Lane
6,467 PointsI need a script to prevent users from entering bad words upon form submission.
Do I need to list out every bad word that I can think of, or is there a library out there somewhere? I have been on stackoverflow other sites researching but have not found a great way to do this without coming up with my own library of words. Any ideas?
1 Answer

miikis
44,944 PointsHey Jenny,
There's not an algorithm for deciding if a word is "bad," if that's what you're asking. But there is this library that seems like it's in the ballpark of what you're looking for. The actual list of words are here.
Edit
There's also this API
Jenny Lane
6,467 PointsJenny Lane
6,467 PointsThat sounds like exactly what I am looking for! Thanks, ill check it out!