mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added URL args validation.
This commit is contained in:
parent
16b25b04b0
commit
a7ea8fead5
6 changed files with 22 additions and 8 deletions
|
@ -107,4 +107,7 @@ function random(max) { return Math.floor(Math.random() * max); }
|
|||
function trademarks(x) { return x.replace(/\(R\)/g, '®').replace(/\(TM\)/g, '™'); }
|
||||
|
||||
// Pad a number with zeros on the left
|
||||
function zeroPad(num, c) { if (c == null) { c = 2; } var s = "00000000" + num; return s.substr(s.length - c); }
|
||||
function zeroPad(num, c) { if (c == null) { c = 2; } var s = "00000000" + num; return s.substr(s.length - c); }
|
||||
|
||||
// String validation
|
||||
function isAlphaNumeric(str) { return (str.match(/^[A-Za-z0-9]+$/) != null); };
|
Loading…
Add table
Add a link
Reference in a new issue