Comments (2)
Thanks Matt!
I'll look into it.
from contentful.net.
Thanks for noticing this!
A fix and a new updated NuGet package should be available any minute now.
The only difference from your proposed API is that the LinkContentTypeValidator
does not have a constructor with just one string. You'd have to either add a IEnumerable<string>
of content types or you can simply go. new LinkContentTypeValidator("Errormessage", "Market")
. That'd set the error message if someone tries to add another content type into the list and restrict it to the "Market" content type.
So your full example would be:
new ContentType
{
SystemProperties = new SystemProperties { Id = "test" },
Name = "Test",
Description = "Test content type",
DisplayField = "title",
Fields = new List<Field>
{
new Field {Id="id", Name="Id", Required=true, Type="Symbol", Validations = new List<IFieldValidator> { new UniqueValidator() } },
new Field {Id="title", Name="Title", Required=true, Type="Symbol" },
new Field {Id="widgets", Name="Widgets", Type="Array", Items = new Schema {
Type = "Link",
LinkType ="Entry",
Validations = new List<IFieldValidator> { new LinkContentTypeValidator("Custom error message", "Market")} }
} }
}
from contentful.net.
Related Issues (20)
- Response size too big. Maximum allowed response size: 7340032b HOT 1
- DeserializeWebhookRequestAsync cannot deserialize a Document (rich text content) HOT 3
- Assets are not resolved selectively HOT 10
- Unable to save Rich Text field with BlockData HOT 4
- VerisonMismatch HOT 4
- Quality parameter is discarded for webp images in ImageUrlBuilder HOT 2
- Support ETag in SDK for improved caching HOT 10
- Support Environments HOT 1
- QueryBuilder is hostile to re-use HOT 2
- GetEntriesForLocale() always throws βThe resource could not be found.β
- Newtonsoft 13 - Maxdepth error HOT 1
- [v7.1.0] Serialization Error when using a reference in an Entity HOT 3
- Support quality parameter via ImageTagHelper for webp format HOT 4
- Sync API and UsePreviewApi HOT 4
- Call to GetEntriesRaw not resolving linked entries like JavaScript Sdk HOT 4
- Deserializing response that references same content twice in to different objects throws System.ArgumentException: The value "Type" is not of "Expected type" HOT 4
- Assets returning null for some entries but not others, even when published. HOT 2
- Issue with deserialization with sub/superscript is enabled for RichText HOT 2
- Is there a way to setup a default IContentTypeResolver? HOT 2
- ContentfulClient GetEntries not resolving entries sub props objects correctly in certain scenario HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from contentful.net.