mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-25 20:57:38 +00:00
Allow digits in field names
This commit is contained in:
@@ -413,6 +413,18 @@ exports.parseTextReference = function(textRef) {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Checks whether a string is a valid fieldname
|
||||
*/
|
||||
exports.isValidFieldName = function(name) {
|
||||
if(!name || typeof name !== "string") {
|
||||
return false;
|
||||
}
|
||||
name = name.toLowerCase().trim();
|
||||
var fieldValidatorRegEx = /^[a-z0-9\-\._]+$/mg;
|
||||
return fieldValidatorRegEx.test(name);
|
||||
};
|
||||
|
||||
/*
|
||||
Extract the version number from the meta tag or from the boot file
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user