I created a custom pagelayout with some fields. One of these fields is required. When it is empty and you save the page you will get an validation error. It is now black. How can I change it to the red color?

Here is an example of the validation message just in black color.

  • The only thing I did is creating a new pagelayout and drag and drop the fields from sharepoint designer. – Ola Sep 8 '15 at 11:26
  • In your custom pagelayout, choose the span using CSS and set color to red. – Akhoy Sep 8 '15 at 11:31

the css-class ms-error does paint a span red if that is what you want.

  • the span is created when the field is empty and you do a postback. So the span with the warning is not available in the pagelayout. – Ola Sep 8 '15 at 12:29
  • @Ola you should use jQuery for this then. – Akhoy Sep 8 '15 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.