Tests if the logical value val, which is a string, is valid.
The validation is based on the class parameter settings used for the class attribute this data type is associated with. In this case, MINLEN, MAXLEN, VALUELIST, and PATTERN.