Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add hyphens for properties in folksonomy #8278

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions html/js/folksonomy.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function displayFolksonomyPropertyValues() {
'<td>' +
'<input id="fe_form_new_property" name="property" class="text tagify-me" value="" lang="en" placeholder="Enter a property" ></input>' +
'<small id="fe_prop_eg" >Example: color</small>' +
'<small id="fe_prop_err" style="visibility: hidden;"><br>Can countain only minus letters, numbers, "_", and ":"</small>' +
'<small id="fe_prop_err" style="visibility: hidden;"><br>Can contain only lower case letters, numbers, "-", "_", and ":"</small>' +
'</td>' +
'<td>' +
'<input id="fe_form_new_value" name="value" placeholder="value" ></input>' +
Expand Down Expand Up @@ -208,7 +208,7 @@ function displayFolksonomyPropertyValues() {

// Control new property entry
$("#fe_form_new_property").on("keyup", function() {
const kControl = /^[a-z0-9_]+(\\:[a-z0-9_]+)*$/; // a property is made of minus letters + numbers + _ and :
const kControl = /^[a-z0-9_-]+(\\:[a-z0-9_-]+)*$/; // a property is made of lower case letters + numbers + - + _ and :
if ($("#fe_form_new_property").val() && kControl.test($("#fe_form_new_property").val()) === false) {
console.log("k syntax is bad!");
$("#fe_prop_err").css("visibility", "visible");
Expand Down