Fix "Snippet name is invalid" error on mysql database

Fix validation error when create a new snippet on mysql database