Server-side implementation of slug generation and validation