Skip to content

Commit

Permalink
feat: add hyphens for properties in folksonomy (#8278)
Browse files Browse the repository at this point in the history
add hyphens for properties in folksonomy
  • Loading branch information
benbenben2 authored Apr 11, 2023
1 parent 79e41b3 commit dee45c2
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit dee45c2

Please sign in to comment.