From f3b6d680c0d78583c14243bcc60d39c8f0c6014d Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 5 Jan 2024 22:11:32 -0400 Subject: data: contentString (#composite/wiki-properties) --- src/data/composite/wiki-properties/contentString.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/data/composite/wiki-properties/contentString.js (limited to 'src/data/composite/wiki-properties/contentString.js') 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}, + }; +} -- cgit 1.3.0-6-gf8a5