Files
aowow/static/js/admin.js
Sarjuuk b890d6504e Guides: initial implementation
* a guide is a wrapper around an article providing management tools.
 * administration is limited to the review process. Needs to be expanded.
 * articles on DB pages are seperate. Editor will be added in the future.
2022-03-22 15:43:39 +01:00

20 lines
501 B
JavaScript

function ar_IsValidUrl(a) {
return a.match(/^[a-z0-9=_&\.\/\-]{2,64}$/i) != null;
}
function ar_ValidateUrl(a) {
if (ar_IsValidUrl(a)) {
return null;
}
if (a.length < 2) {
return "URL must be at least 2 characters long.";
}
else if (a.length > 64) {
return "URL must be at most 64 characters long.";
}
else {
return "You used invalid characters in your URL.\n\nYou can only use the following:\n a to z\n 0 to 9\n = _ & . / -"
}
};