Add pattern support for inputs