Validate against non-alphanumeric characters in keys, in TDFs
This commit is contained in:
@@ -1113,12 +1113,9 @@ class ValidationService
|
|||||||
$failures[] = 'Key must contain only lowercase characters';
|
$failures[] = 'Key must contain only lowercase characters';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (str_contains($key, ' ')) {
|
// The underscore character is the only non-alphanumeric character that is permitted in keys
|
||||||
$failures[] = 'Key contains at least one whitespace';
|
if (!ctype_alnum(str_replace('_', '', $key))) {
|
||||||
}
|
$failures[] = 'Key contains non-alphanumeric characters';
|
||||||
|
|
||||||
if (str_contains($key, '.')) {
|
|
||||||
$failures[] = 'Key contains at least one period (".") character';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return array_map(
|
return array_map(
|
||||||
|
|||||||
Reference in New Issue
Block a user