I have set up a modular block that should always be an unordered list. If the user puts in content that is not part of an unordered list, the module should not validate.
The RegEx pattern I have set is: /^(\*\s.+\n?)+$/
This pattern works well to validate using regexr.com, but in Dato it matches any line. For example:
Dato behavior:
* This validates
even though the second line is not a list item
This validates
* even though the first line is not a list item
This does not validate
because neither line is a list item
regexr.com behavior:
Which is behaving as expected
* This does not validate
because the second line is not a list item
This does not vaidate
* because the first line is not a list item
This does not validate
because neither line is a list item
* This does validate
* because both lines are list items