```
validates_format_of :tags, :with => /^(([^,]+),){0,3}([^,]+)$/

```

With this validations possible this regexp:

```
key1, key2, key3, key4

```

However I would like limit the byte number of each keyword to maximum `30`, so this keyword would be possible in regexp:

```
keyword with More than 30 bytes

```

This is specifications link:

<https://developers.google.com/youtube/2.0/reference#youtube_data_api_tag_media:keywords>

**How I can add this filter to the above regular expression?**