Question: I want to check a list contains a specific string .

before checking all entries in list as well as sting should be in. lowercase

I tried like this 

```
 def venueName = params.name
 def venueNameLists = Venue.executeQuery("select name from Venue")
  if(venueNameLists.toLowerCase().contains(venueName.toLowerCase())){
            error = true;
            log.debug("save :: duplicate name")
            flash.message = "Venue name already exist";
            render(view: "create", model: [venueInstance: new Venue(params)])
            return
        }

```

gives error

```
  No signature of method: java.util.ArrayList.toLowerCase() is applicable for argument types: () values: []. Stacktrace follows:

  groovy.lang.MissingMethodException: No signature of method: java.util.ArrayList.toLowerCase() is applicable for argument types: () values: []

```

Answer: 
I agree with **aiolos**: use constraints or try to find instance by name ignore case. But to fix this your way try `*.` ([spread operator](https://groovy-lang.org/operators.html#_spread_operator)):

```
venueNameLists*.toLowerCase().contains(venueName.toLowerCase()) 

```
If you were looking how to check if multiple strings contains a word, while ignoring case-sensitive, use (?i) on a regex of words. 

For example, the following will be positive condition:

```
word = "YES"
word.matches(/(?i)yes|ok|true/)

```