Added validation to register window.