Adding input validation for non-chrome browsers