1
0
Fork 0
mirror of https://github.com/marty-oehme/scripts.git synced 2025-12-09 13:32:46 +00:00

added checking for invalid characters in the identifier

This commit is contained in:
Patrizio Bekerle 2017-05-16 19:00:14 +02:00
parent 2b7735ff59
commit b443664675
No known key found for this signature in database
GPG key ID: 2E9FFD770DABE838
2 changed files with 5 additions and 2 deletions

View file

@ -39,8 +39,11 @@ class TestHelper {
$errors[] = "No name was entered!";
}
if ($data["identifier"] == "") {
$identifier = $data["identifier"];
if ($identifier == "") {
$errors[] = "No identifier was entered!";
} elseif (preg_match('/[^a-z0-9]/', $str)) {
$errors[] = "Invalid charactes were found in identifier '$identifier'!";
}
if ($data["description"] == "") {