Description: Checks if the input string only contains valid characters and is not longer than the maximum length and shuts down the application if not.
Parameter:
- val: String value to check.
- maxlen: The maximal length of the the string or 0 if the string length doesn't matter.
- allowEmpty: Set to true if you want to allow empty strings.
- returnNoDie: Set to true if you want to return (instead of aborting the program) when an error in the input is found.
Returns:
- The input string or stops the program on an error.
root
2015-09-06