Added some validation to the pages