Make ‘var’ attribute of a Field optional
Looking at [the spec](https://xmpp.org/extensions/xep-0004.html#protocol-field) it seems valid not to have a `var` attribute set, at least for fields of type `fixed` that is: > If the element type is anything other than "fixed" (see below), it MUST > possess a 'var' attribute that uniquely identifies the field in the context > of the form (if it is "fixed", it MAY possess a 'var' attribute). The element > MAY possess a 'label' attribute that defines a human-readable name for the field.
This commit is contained in:
parent
079379a178
commit
ac0707e52d
7 changed files with 71 additions and 24 deletions
|
|
@ -229,7 +229,7 @@ mod tests {
|
|||
title: None,
|
||||
instructions: None,
|
||||
fields: vec![Field {
|
||||
var: String::from("pubsub#access_model"),
|
||||
var: Some(String::from("pubsub#access_model")),
|
||||
type_: FieldType::ListSingle,
|
||||
label: None,
|
||||
required: false,
|
||||
|
|
@ -276,7 +276,7 @@ mod tests {
|
|||
title: None,
|
||||
instructions: None,
|
||||
fields: vec![Field {
|
||||
var: String::from("pubsub#access_model"),
|
||||
var: Some(String::from("pubsub#access_model")),
|
||||
type_: FieldType::ListSingle,
|
||||
label: None,
|
||||
required: false,
|
||||
|
|
|
|||
|
|
@ -621,7 +621,7 @@ mod tests {
|
|||
title: None,
|
||||
instructions: None,
|
||||
fields: vec![Field {
|
||||
var: String::from("pubsub#access_model"),
|
||||
var: Some(String::from("pubsub#access_model")),
|
||||
type_: FieldType::ListSingle,
|
||||
label: None,
|
||||
required: false,
|
||||
|
|
|
|||
Loading…
Reference in a new issue