Tech Mahindra interview question

3. How do you perform user-validation on the front end?