---
assert:
  1_or_2:
    code: |
      return 1 unless defined $_;
      my @v = (/(\w+)/g);
      return  (@v < 3) ? 1 : 0;
    msg: value must not have more than 2 fields.
  accepted_values:
    code: |
      return 1 unless defined $_;
      my @v = (/(\S+)/g);
      my @good = grep {/^(af[1-4][1-3]|cs[0-7]|ef|lowdelay|throughput|reliability|\d+)/} @v ;
      return @good == @v ? 1 : 0;
    msg: |
      Unexpected value "$_". Expected 1 or 2 occurences of: "af11", "af12", "af13", "af21", "af22",
      "af23", "af31", "af32", "af33", "af41", "af42", "af43", "cs0", "cs1",
      "cs2", "cs3", "cs4", "cs5", "cs6", "cs7", "ef", "lowdelay",
      "throughput", "reliability", or numeric value.