A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
When doing it by code you can send in a SkipValidation flag
_contentRepository.Save(IContent, SaveAction.SkipValidation | SaveAction.Publish, AccessLevel.NoAccess);
That should skip the validation for the required attributes if I remember correctly
Hello everyone,
We have a custom service that can create draft content using the
IContentRepositoryand some of the content properties are annotated with the[Required]attribute. The service does not always have the content required for those fields and a content editor has to add the missing content before publishing.We could use the approach described in the article below — however the problem is that the properties should still be required when the user creates content but not when it is created by our service.
https://www.david-tec.com/2017/07/hiding-required-properties-on-the-create-new-page-in-episerver/
Any advice?