How to match youtube links?
Matching youtube urls and their IDs
Just like slugs, you usually want to restrict what people can choose for their username. This will prevent future layout issues, querying problems, and who knows what else.
This will restrict a username to alphanumeric characters, underscores, and dashes. It will also force the username to be between 3-16 characters.