Updated frequency input validation