Basic input validation on the frontend