added input validation to mobile