How to write custom lint to detect capital letters in host

I tried this but did not work. Please suggest the syntax for the regular expression.
host_must_be_lowercase:
enabled: true
summary: Host must be lowercase
type: style
then:
field: host
function: pattern
functionOptions:
notMatch: ^[A-Z]$

This worked for me.
host_must_be_lowercase:
enabled: true
summary: Host must be lowercase
type: style
then:
field: host
function: pattern
functionOptions:
match: ^[^A-Z]*$