|
| 1 | +# Multi-Step Registration Form |
| 2 | +### Table of Contents |
| 3 | + |
| 4 | +- [Multi\-Step Registration Form](#root) |
| 5 | + - [account](#%2Fproperties%2Faccount) |
| 6 | + - [personal](#%2Fproperties%2Fpersonal) |
| 7 | + - [payment](#%2Fproperties%2Fpayment) |
| 8 | + - [Credit Card](#%2Fproperties%2Fpayment%2FoneOf%2F0) |
| 9 | + - [method](#%2Fproperties%2Fpayment%2FoneOf%2F0%2Fproperties%2Fmethod) |
| 10 | + - [SEPA Direct Debit](#%2Fproperties%2Fpayment%2FoneOf%2F1) |
| 11 | + - [method](#%2Fproperties%2Fpayment%2FoneOf%2F1%2Fproperties%2Fmethod) |
| 12 | + - [preferences](#%2Fproperties%2Fpreferences) |
| 13 | + - [theme](#%2Fproperties%2Fpreferences%2Fproperties%2Ftheme) |
| 14 | + - [extraData](#%2Fproperties%2FextraData) |
| 15 | + - [parentalConsent](#%2Fproperties%2FparentalConsent) |
| 16 | + |
| 17 | +--- |
| 18 | +### <a id="root"></a>[Multi\-Step Registration Form](#root) |
| 19 | +*Schema for a dynamic, multi-step registration process supporting conditional logic and custom metadata.* |
| 20 | + |
| 21 | +#### Properties |
| 22 | + |
| 23 | +| Name | Type | Required | Description | |
| 24 | +|------|------|------|------| |
| 25 | +| account | <u>[account](#%2Fproperties%2Faccount)</u> | <span style="color:lightblue">true</span> | User account credentials. | |
| 26 | +| personal | <u>[personal](#%2Fproperties%2Fpersonal)</u> | <span style="color:lightblue">true</span> | User personal information. | |
| 27 | +| payment | <u>[payment](#%2Fproperties%2Fpayment)</u> | <span style="color:lightblue">true</span> | Preferred payment method. | |
| 28 | +| preferences | <u>[preferences](#%2Fproperties%2Fpreferences)</u> | <span style="color:salmon">false</span> | User\-configurable preferences. | |
| 29 | +| extraData | <u>[extraData](#%2Fproperties%2FextraData)</u> | <span style="color:salmon">false</span> | Custom vendor metadata. | |
| 30 | +| parentalConsent | <u>[parentalConsent](#%2Fproperties%2FparentalConsent)</u> | <span style="color:salmon">false</span> | Parental consent section \(for users under 18\). | |
| 31 | + |
| 32 | +<details> |
| 33 | +<summary>Conditionals</summary> |
| 34 | +#### if |
| 35 | +```json |
| 36 | +{ |
| 37 | + "properties": { |
| 38 | + "personal": { |
| 39 | + "properties": { |
| 40 | + "age": { |
| 41 | + "maximum": 17, |
| 42 | + "title": "age" |
| 43 | + } |
| 44 | + }, |
| 45 | + "title": "personal", |
| 46 | + "type": "object" |
| 47 | + } |
| 48 | + }, |
| 49 | + "required": [ |
| 50 | + "personal" |
| 51 | + ], |
| 52 | + "type": "object" |
| 53 | +} |
| 54 | +``` |
| 55 | + |
| 56 | +#### then |
| 57 | +```json |
| 58 | +{ |
| 59 | + "required": [ |
| 60 | + "parentalConsent" |
| 61 | + ], |
| 62 | + "properties": { |
| 63 | + "parentalConsent": {} |
| 64 | + } |
| 65 | +} |
| 66 | +``` |
| 67 | + |
| 68 | +</details> |
| 69 | +#### Example |
| 70 | + |
| 71 | +```json |
| 72 | +{ |
| 73 | + "account": { |
| 74 | + "username": "mert_dev", |
| 75 | + "password": "hunter42" |
| 76 | + }, |
| 77 | + "personal": { |
| 78 | + "fullName": "Mert Ali Barlas", |
| 79 | + "age": 17, |
| 80 | + "country": "DE", |
| 81 | + "newsletter": true |
| 82 | + }, |
| 83 | + "payment": { |
| 84 | + "method": "sepa", |
| 85 | + "iban": "DE89370400440532013000" |
| 86 | + }, |
| 87 | + "preferences": { |
| 88 | + "theme": "dark", |
| 89 | + "language": "de-DE" |
| 90 | + }, |
| 91 | + "extraData": { |
| 92 | + "x-referral": "FRIEND2025" |
| 93 | + }, |
| 94 | + "parentalConsent": { |
| 95 | + "guardianName": "Ali Barlas", |
| 96 | + "guardianEmail": "[email protected]" |
| 97 | + } |
| 98 | +} |
| 99 | +``` |
| 100 | +--- |
| 101 | +### <a id="%2Fproperties%2Faccount"></a>[account](#%2Fproperties%2Faccount) |
| 102 | +*User account credentials.* |
| 103 | + |
| 104 | +#### Properties |
| 105 | + |
| 106 | +| Name | Type | Required | Description | Constraints | |
| 107 | +|------|------|------|------|------| |
| 108 | +| <a id="%2Fproperties%2Faccount%2Fproperties%2Fusername"></a>username | string | <span style="color:lightblue">true</span> | Unique username \(alphanumeric \+ underscore\). | minLength: 4, maxLength: 16, pattern: "^\[a\-zA\-Z0\-9\_\]\+$" | |
| 109 | +| <a id="%2Fproperties%2Faccount%2Fproperties%2Fpassword"></a>password | string | <span style="color:lightblue">true</span> | Password with at least 8 characters. | minLength: 8 | |
| 110 | + |
| 111 | +#### Example |
| 112 | + |
| 113 | +```json |
| 114 | +{ |
| 115 | + "username": "{string}", |
| 116 | + "password": "{string}" |
| 117 | +} |
| 118 | +``` |
| 119 | +--- |
| 120 | +### <a id="%2Fproperties%2Fpersonal"></a>[personal](#%2Fproperties%2Fpersonal) |
| 121 | +*User personal information.* |
| 122 | + |
| 123 | +#### Properties |
| 124 | + |
| 125 | +| Name | Type | Required | Description | Constraints | |
| 126 | +|------|------|------|------|------| |
| 127 | +| <a id="%2Fproperties%2Fpersonal%2Fproperties%2FfullName"></a>fullName | string | <span style="color:lightblue">true</span> | User's full legal name. | \- | |
| 128 | +| <a id="%2Fproperties%2Fpersonal%2Fproperties%2Fage"></a>age | integer | <span style="color:lightblue">true</span> | User's age in years. | minimum: 0 | |
| 129 | +| <a id="%2Fproperties%2Fpersonal%2Fproperties%2Fcountry"></a>country | string | <span style="color:lightblue">true</span> | Country of residence. | \- | |
| 130 | +| <a id="%2Fproperties%2Fpersonal%2Fproperties%2Fnewsletter"></a>newsletter | boolean | <span style="color:salmon">false</span> | Subscribe to newsletter? | \- | |
| 131 | + |
| 132 | +#### Example |
| 133 | + |
| 134 | +```json |
| 135 | +{ |
| 136 | + "fullName": "{string}", |
| 137 | + "age": "{integer}", |
| 138 | + "country": "{string}", |
| 139 | + "newsletter": "{boolean}" |
| 140 | +} |
| 141 | +``` |
| 142 | +--- |
| 143 | +### <a id="%2Fproperties%2Fpayment"></a>[payment](#%2Fproperties%2Fpayment) |
| 144 | +*Preferred payment method.* |
| 145 | + |
| 146 | +#### oneOf |
| 147 | +<b>Option 1</b> |
| 148 | +##### <u>[Credit Card](#%2Fproperties%2Fpayment%2FoneOf%2F0)</u> |
| 149 | +<b>Option 2</b> |
| 150 | +##### <u>[SEPA Direct Debit](#%2Fproperties%2Fpayment%2FoneOf%2F1)</u> |
| 151 | +#### Example |
| 152 | + |
| 153 | +```json |
| 154 | +{ |
| 155 | + "method": "card", |
| 156 | + "cardNumber": "{string}", |
| 157 | + "expiration": "{string}" |
| 158 | +} |
| 159 | +``` |
| 160 | +--- |
| 161 | +### <a id="%2Fproperties%2Fpayment%2FoneOf%2F0"></a>[Credit Card](#%2Fproperties%2Fpayment%2FoneOf%2F0) |
| 162 | +#### Properties |
| 163 | + |
| 164 | +| Name | Type | Required | Description | Constraints | |
| 165 | +|------|------|------|------|------| |
| 166 | +| method | <u>[method](#%2Fproperties%2Fpayment%2FoneOf%2F0%2Fproperties%2Fmethod)</u> | <span style="color:lightblue">true</span> | \- | \- | |
| 167 | +| <a id="%2Fproperties%2Fpayment%2FoneOf%2F0%2Fproperties%2FcardNumber"></a>cardNumber | string | <span style="color:lightblue">true</span> | Card number \(16 digits\). | pattern: "^\[0\-9\]{16}$" | |
| 168 | +| <a id="%2Fproperties%2Fpayment%2FoneOf%2F0%2Fproperties%2Fexpiration"></a>expiration | string | <span style="color:lightblue">true</span> | Expiration date \(MM/YY\). | pattern: "^\(0\[1\-9\]\|1\[0\-2\]\)\\\\/\\\\d{2}$" | |
| 169 | + |
| 170 | +#### Example |
| 171 | + |
| 172 | +```json |
| 173 | +{ |
| 174 | + "method": "card", |
| 175 | + "cardNumber": "{string}", |
| 176 | + "expiration": "{string}" |
| 177 | +} |
| 178 | +``` |
| 179 | +--- |
| 180 | +### <a id="%2Fproperties%2Fpayment%2FoneOf%2F0%2Fproperties%2Fmethod"></a>[method](#%2Fproperties%2Fpayment%2FoneOf%2F0%2Fproperties%2Fmethod) |
| 181 | +#### Enumeration Values |
| 182 | +- `card` |
| 183 | + |
| 184 | +--- |
| 185 | +### <a id="%2Fproperties%2Fpayment%2FoneOf%2F1"></a>[SEPA Direct Debit](#%2Fproperties%2Fpayment%2FoneOf%2F1) |
| 186 | +#### Properties |
| 187 | + |
| 188 | +| Name | Type | Required | Description | Constraints | |
| 189 | +|------|------|------|------|------| |
| 190 | +| method | <u>[method](#%2Fproperties%2Fpayment%2FoneOf%2F1%2Fproperties%2Fmethod)</u> | <span style="color:lightblue">true</span> | \- | \- | |
| 191 | +| <a id="%2Fproperties%2Fpayment%2FoneOf%2F1%2Fproperties%2Fiban"></a>iban | string | <span style="color:lightblue">true</span> | IBAN format | pattern: "^\[A\-Z\]{2}\\\\d{2}\[A\-Z0\-9\]{1,30}$" | |
| 192 | + |
| 193 | +#### Example |
| 194 | + |
| 195 | +```json |
| 196 | +{ |
| 197 | + "method": "sepa", |
| 198 | + "iban": "{string}" |
| 199 | +} |
| 200 | +``` |
| 201 | +--- |
| 202 | +### <a id="%2Fproperties%2Fpayment%2FoneOf%2F1%2Fproperties%2Fmethod"></a>[method](#%2Fproperties%2Fpayment%2FoneOf%2F1%2Fproperties%2Fmethod) |
| 203 | +#### Enumeration Values |
| 204 | +- `sepa` |
| 205 | + |
| 206 | +--- |
| 207 | +### <a id="%2Fproperties%2Fpreferences"></a>[preferences](#%2Fproperties%2Fpreferences) |
| 208 | +*User-configurable preferences.* |
| 209 | + |
| 210 | +#### Properties |
| 211 | + |
| 212 | +| Name | Type | Required | Description | Constraints | Default | |
| 213 | +|------|------|------|------|------|------| |
| 214 | +| theme | <u>[theme](#%2Fproperties%2Fpreferences%2Fproperties%2Ftheme)</u> | <span style="color:salmon">false</span> | \- | \- | "system" | |
| 215 | +| <a id="%2Fproperties%2Fpreferences%2Fproperties%2Flanguage"></a>language | string | <span style="color:salmon">false</span> | Language code \(e.g., en, de\-DE\). | pattern: "^\[a\-z\]{2}\(\-\[A\-Z\]{2}\)?$" | "en" | |
| 216 | + |
| 217 | +#### Example |
| 218 | + |
| 219 | +```json |
| 220 | +{ |
| 221 | + "theme": "{string}", |
| 222 | + "language": "{string}" |
| 223 | +} |
| 224 | +``` |
| 225 | +--- |
| 226 | +### <a id="%2Fproperties%2Fpreferences%2Fproperties%2Ftheme"></a>[theme](#%2Fproperties%2Fpreferences%2Fproperties%2Ftheme) |
| 227 | +#### Enumeration Values |
| 228 | +- `light` |
| 229 | +- `dark` |
| 230 | +- `system` |
| 231 | + |
| 232 | +--- |
| 233 | +### <a id="%2Fproperties%2FextraData"></a>[extraData](#%2Fproperties%2FextraData) |
| 234 | +*Custom vendor metadata.* |
| 235 | + |
| 236 | +#### Properties |
| 237 | + |
| 238 | +| Name | Type | Required | Description | |
| 239 | +|------|------|------|------| |
| 240 | +| <a id="%2Fproperties%2FextraData%2FpatternProperties%2F%5Ex-%5Ba-zA-Z0-9_%5D%2B%24"></a>^x\-\[a\-zA\-Z0\-9\_\]\+$ | string | <span style="color:salmon">false</span> | Custom key/value metadata prefixed with 'x\-'. | |
| 241 | + |
| 242 | +#### Example |
| 243 | + |
| 244 | +```json |
| 245 | +{ |
| 246 | + "^x-[a-zA-Z0-9_]+$": "{string}" |
| 247 | +} |
| 248 | +``` |
| 249 | +--- |
| 250 | +### <a id="%2Fproperties%2FparentalConsent"></a>[parentalConsent](#%2Fproperties%2FparentalConsent) |
| 251 | +*Parental consent section (for users under 18).* |
| 252 | + |
| 253 | +#### Properties |
| 254 | + |
| 255 | +| Name | Type | Required | Description | Constraints | |
| 256 | +|------|------|------|------|------| |
| 257 | +| <a id="%2Fproperties%2FparentalConsent%2Fproperties%2FguardianName"></a>guardianName | string | <span style="color:lightblue">true</span> | \- | \- | |
| 258 | +| <a id="%2Fproperties%2FparentalConsent%2Fproperties%2FguardianEmail"></a>guardianEmail | string | <span style="color:lightblue">true</span> | \- | format: "email" | |
| 259 | + |
| 260 | +#### Example |
| 261 | + |
| 262 | +```json |
| 263 | +{ |
| 264 | + "guardianName": "{string}", |
| 265 | + "guardianEmail": "{string}" |
| 266 | +} |
| 267 | +``` |
0 commit comments