Skip to content

Commit

Permalink
Add further.requirements for forms (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartpb authored Nov 15, 2017
1 parent a6e13e4 commit 5f027d6
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 0 deletions.
4 changes: 4 additions & 0 deletions draft/docs/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,7 @@ If a checkbox for this is present, it will be described as the `login.form.persi
## Terms agreement

The `registration.form.terms.agreement` property describes whether registration features a `checkbox` to denote that you agree to the site's legal terms, or if the agreement to terms is spelled out as `implicit` (ie. "By clicking the Submit button, you agree to...").

## Further requirements

Required information or steps not described by other properties under `form` may have a `further.requirements` list describing these requirements, following the [documentation on descriptions](descriptions.md).
55 changes: 55 additions & 0 deletions draft/profiles.copld.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,11 @@ definitions:
captcha:
$ref: "#/definitions/formcaptcha"

further.:

requirements:
$ref: "#/definitions/desclist"

# body #

type: object
Expand Down Expand Up @@ -511,6 +516,11 @@ properties:
account:
$ref: "#/definitions/accountfield"

further.:

requirements:
$ref: "#/definitions/desclist"

submit.:

destination.:
Expand Down Expand Up @@ -655,6 +665,11 @@ properties:
oldpassword:
$ref: "#/definitions/formfield"

further.:

requirements:
$ref: "#/definitions/desclist"

form.:

oldpassword:
Expand All @@ -668,13 +683,23 @@ properties:
newpassword:
$ref: "#/definitions/formfield"

further.:

requirements:
$ref: "#/definitions/desclist"

after.:

form.:

oldpassword:
$ref: "#/definitions/formfield"

further.:

requirements:
$ref: "#/definitions/desclist"

sessions.:

own:
Expand Down Expand Up @@ -733,6 +758,11 @@ properties:
captcha:
$ref: "#/definitions/formcaptcha"

further.:

requirements:
$ref: "#/definitions/desclist"

response.:

email.:
Expand Down Expand Up @@ -767,6 +797,11 @@ properties:
password:
$ref: "#/definitions/formfield"

further.:

requirements:
$ref: "#/definitions/desclist"

form.:

password:
Expand All @@ -780,13 +815,23 @@ properties:
newusername:
$ref: "#/definitions/formfield"

further.:

requirements:
$ref: "#/definitions/desclist"

after.:

form.:

password:
$ref: "#/definitions/formfield"

further.:

requirements:
$ref: "#/definitions/desclist"

documentation:
type: array
minItems: 1
Expand Down Expand Up @@ -872,6 +917,11 @@ properties:
circumstances:
$ref: "#/definitions/desclist"

further.:

requirements:
$ref: "#/definitions/desclist"

login.:

url:
Expand All @@ -894,6 +944,11 @@ properties:
password:
$ref: "#/definitions/formfield"

further.:

requirements:
$ref: "#/definitions/desclist"

persist.:

checkbox:
Expand Down
99 changes: 99 additions & 0 deletions draft/profiles.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,15 @@
},
"captcha": {
"$ref": "#/definitions/formcaptcha"
},
"further": {
"type": "object",
"properties": {
"requirements": {
"$ref": "#/definitions/desclist"
}
},
"minimumProperties": 1
}
},
"minimumProperties": 1
Expand Down Expand Up @@ -624,6 +633,15 @@
},
"account": {
"$ref": "#/definitions/accountfield"
},
"further": {
"type": "object",
"properties": {
"requirements": {
"$ref": "#/definitions/desclist"
}
},
"minimumProperties": 1
}
},
"minimumProperties": 1
Expand Down Expand Up @@ -841,6 +859,15 @@
"properties": {
"oldpassword": {
"$ref": "#/definitions/formfield"
},
"further": {
"type": "object",
"properties": {
"requirements": {
"$ref": "#/definitions/desclist"
}
},
"minimumProperties": 1
}
},
"minimumProperties": 1
Expand All @@ -865,6 +892,15 @@
}
},
"minimumProperties": 1
},
"further": {
"type": "object",
"properties": {
"requirements": {
"$ref": "#/definitions/desclist"
}
},
"minimumProperties": 1
}
},
"minimumProperties": 1
Expand All @@ -877,6 +913,15 @@
"properties": {
"oldpassword": {
"$ref": "#/definitions/formfield"
},
"further": {
"type": "object",
"properties": {
"requirements": {
"$ref": "#/definitions/desclist"
}
},
"minimumProperties": 1
}
},
"minimumProperties": 1
Expand Down Expand Up @@ -958,6 +1003,15 @@
},
"captcha": {
"$ref": "#/definitions/formcaptcha"
},
"further": {
"type": "object",
"properties": {
"requirements": {
"$ref": "#/definitions/desclist"
}
},
"minimumProperties": 1
}
},
"minimumProperties": 1
Expand Down Expand Up @@ -1014,6 +1068,15 @@
"properties": {
"password": {
"$ref": "#/definitions/formfield"
},
"further": {
"type": "object",
"properties": {
"requirements": {
"$ref": "#/definitions/desclist"
}
},
"minimumProperties": 1
}
},
"minimumProperties": 1
Expand All @@ -1038,6 +1101,15 @@
}
},
"minimumProperties": 1
},
"further": {
"type": "object",
"properties": {
"requirements": {
"$ref": "#/definitions/desclist"
}
},
"minimumProperties": 1
}
},
"minimumProperties": 1
Expand All @@ -1050,6 +1122,15 @@
"properties": {
"password": {
"$ref": "#/definitions/formfield"
},
"further": {
"type": "object",
"properties": {
"requirements": {
"$ref": "#/definitions/desclist"
}
},
"minimumProperties": 1
}
},
"minimumProperties": 1
Expand Down Expand Up @@ -1168,6 +1249,15 @@
}
},
"minimumProperties": 1
},
"further": {
"type": "object",
"properties": {
"requirements": {
"$ref": "#/definitions/desclist"
}
},
"minimumProperties": 1
}
},
"minimumProperties": 1
Expand Down Expand Up @@ -1199,6 +1289,15 @@
"password": {
"$ref": "#/definitions/formfield"
},
"further": {
"type": "object",
"properties": {
"requirements": {
"$ref": "#/definitions/desclist"
}
},
"minimumProperties": 1
},
"persist": {
"type": "object",
"properties": {
Expand Down

0 comments on commit 5f027d6

Please sign in to comment.