Defines maximum length for a Readingname (MAXLEN_RN) and for a Device name (MAXLEN_DN).
### goodDeviceName
### goodReadingName
### goodReadingName
```perl
```perl
$valid=goodReadingName($name);
$valid=goodReadingName($name);
```
```
This function checks if *Readingname*`$name` is a valid format which consists of
This function checks if *Readingname*`$name` is a valid format which means up to MAXLEN:RN and consisting of any UTF-8 character except
* upper and lowercase letters [a-zA-Z]
* whitespace (`\s`)
* digits [0-9]
* underscore `_`
* minus `-`
* dot `.`
* slash `/`
If the identifier starts with a dot `.`, it's considered to be an internal identifier and is treated differently in visualization, i.e. hidden.
If the identifier starts with a dot `.`, it's considered to be an internal identifier and is treated differently in visualization, i.e. hidden. The leading `.` is not included in MAXLEN_RN length considerations.
For valid identifiers a true value is returned, false otherwise. This function can be used in if-constructs directly to test whether a *Readingname* is valid or not.
For valid identifiers a true value is returned, false otherwise. This function can be used in if-constructs directly to test whether a *Readingname* is valid or not.
TODO:
### makeDeviceName
Clarify if
```
...
.ätschbätsch
///
-aha-
```
are valid names, because in original FHEM code, they are which is probably a bug.
### makeReadingName
### makeReadingName
```perl
```perl
$validName=makeReadingName($name);
$validName=makeReadingName($name);
```
```
This function removes from given Readingname `$name` all invalid characters and replaces them with the underscore `_`. The return value `$validName` is a Readingname that has only valid characters in it (see `goodReadingName`).
This function removes from given Readingname `$name` all invalid characters and replaces them with the underscore `_`. Also, if the Readingname is longer than MAXLEN_RN it is pruned to this maximum length. The return value `$validName` is a Readingname that has only valid characters in it (see `goodReadingName`).
If `$name` was already valid, `$validName` equals `$name`.
If `$name` was already valid, `$validName` equals `$name`.