JavaScript Input Validation for beginners (Readable)