You have an ASP.NET control that contains validation controls in the masterpage or page layout for a publishing site (an ASP.NET login control for example). When you try to edit and check in a publishing page you receive the following error.
This page contains content or formatting that is not valid. You can find more information in the affected sections.
Even if you fill in all the required fields on the publishing page, the validation controls on the other ASP.NET controls prevent the page from saving.
You have 2 solutions:
1. Put your control in EditModePanel
2. Hide your validators in edit mode:
WebPartManager wp = WebPartManager.GetCurrentWebPartManager(Page);
if(wp.DisplayMode == WebPartManager.BrowseDisplayMode)
yourvalidator.Visible = true;
yourvalidator.Visible = false;