class BinData::DSLMixin::DSLFieldValidator

def validate_field(name)

def validate_field(name)
  if must_not_have_a_name_failed?(name)
    raise SyntaxError, "field must not have a name"
  end
  if all_or_none_names_failed?(name)
    raise SyntaxError, "fields must either all have names, or none must have names"
  end
  if must_have_a_name_failed?(name)
    raise SyntaxError, "field must have a name"
  end
  ensure_valid_name(name)
end