My users have a cookie with a string called code in it, the code is just random numbers or letters between 6 and 15 characters long. How after I receive the code, how can I check to ensure that the code is between 6 and 15 characters long and only contains numbers and letters?
Is using regular expressions the best way?