« get me outta code hell

contentString.js « wiki-properties « composite « data « src - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/composite/wiki-properties/contentString.js
blob: b0e82444855ba8dddaa21bb568f99829e32b047e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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},
  };
}