diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-01-05 22:11:32 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-01-06 12:50:31 -0400 |
commit | f3b6d680c0d78583c14243bcc60d39c8f0c6014d (patch) | |
tree | b8ce379a2e01a03273f086cf66165f5d10ce824a /src/data/composite/wiki-properties/contentString.js | |
parent | 01a1e04649907aaf73564b3442f683cab73c3a78 (diff) |
data: contentString (#composite/wiki-properties)
Diffstat (limited to 'src/data/composite/wiki-properties/contentString.js')
-rw-r--r-- | src/data/composite/wiki-properties/contentString.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/data/composite/wiki-properties/contentString.js b/src/data/composite/wiki-properties/contentString.js new file mode 100644 index 00000000..b0e82444 --- /dev/null +++ b/src/data/composite/wiki-properties/contentString.js @@ -0,0 +1,15 @@ +// String type that's slightly more specific than simpleString. If the +// property is a generic piece of human-reading content, this adds some +// useful valiation on top of simpleString - but still check if more +// particular properties like `name` are more appropriate. +// +// This type adapts validation for single- and multiline content. + +import {isContentString} from '#validators'; + +export default function() { + return { + flags: {update: true, expose: true}, + update: {validate: isContentString}, + }; +} |