Adds support for validation of values using regex.