code: boolean matches(String value) {
      if (pattern == null) {
        return true;
      }
      return pattern.matcher(value).matches();
    }
docs: Checks if the provided value matches the variable pattern, if one is defined. Always true if no
  pattern is defined.
  
  @param value to check.
  @return true if it matches.