Describe the bug
Pattern validation on a list of strings was (almost) fixed (see #2382)
Now the problem is that the list widget is always marked as invalid when the user tries to save - except if the user changes anything in this particular field.
To Reproduce
tag field as described in the config below.tag field (don't touch the tag field)tag field is marked as invalid even if it matches the pattern.tag field is edited in any way, it is validated correctly again.)Expected behavior
tag field should only be invalid if it doesn't match the pattern.
Applicable Versions:
CMS configuration
{
label: "Tags",
name: "tags",
widget: "list",
pattern:
[
"^[^\\s#]+$",
"No spaces and # allowed in tags. Please separate multiple tags with comma.",
]
}
@barthc this is about #2385, have you run into it at all?
@erquhart #2599 should fix this issue.
The issue was, on initial save the list input widget value(array) is passed to the test function here and that works. But on subsequent edit, the value passed to the test function is now a list so validation fails, edit the list input, value back to array, validation works again. So the PR just converts the value(array or list) to string before pattern test.
Merged the fix, but it's backed up in beta at the moment. Should be released soon.
Awesome, thanks for the great work!
About the releases: I don't quite understand how I can track if and when something like this gets released. The CHANGELOG is a list of 20 sub-changelogs and the releases page contains a huge list of relases of individual plugins without any comments. Can you give me a hint about how to keep track of what is happening?
We need a releases page. For now, because everything gets squashed into master, and helped by our use of conventional changelog for descriptive commit messages, the commits on master are the best overall changelog we have: https://github.com/netlify/netlify-cms/commits/master