mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
* 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.
20 lines
501 B
JavaScript
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 = _ & . / -"
|
|
}
|
|
};
|