Methods
-
enum(validValues)
-
Set valid values for the string schema.
Parameters:
Name Type Description validValues
Array.<String> Valid values for the string. There must be at least 2 valid values. -
pattern(pattern)
-
A pattern for the string.
Parameters:
Name Type Description pattern
String | RegExp The pattern for the string. Can be a string with regex syntax, or a RegExp object.