>> Correct me if I misunderstood anything.

Whether that's correct or not depends on what your are trying to do. If you want it to be an error if the user types, "Hello" or "1" or anything without two slashes at the beginning, then your understanding seems fine. If you only want an error if the user types "/something", then you don't need to make steps 1 and 2 display an error.