Added validation to the index page