src/applications/representative-appoint/schema/21-22-AND-21-22A-schema.json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "APPLICATION FOR VRRAP",
"type": "object",
"additionalProperties": false,
"definitions": {
"address": {
"type": "object",
"oneOf": [
{
"properties": {
"country": {
"type": "string",
"enum": ["CAN"]
},
"state": {
"type": "string",
"enum": [
"AB",
"BC",
"MB",
"NB",
"NL",
"NT",
"NS",
"NU",
"ON",
"PE",
"QC",
"SK",
"YT"
]
},
"postalCode": {
"type": "string",
"maxLength": 10
}
}
},
{
"properties": {
"country": {
"type": "string",
"enum": ["MEX"]
},
"state": {
"type": "string",
"enum": [
"aguascalientes",
"baja-california-norte",
"baja-california-sur",
"campeche",
"chiapas",
"chihuahua",
"coahuila",
"colima",
"distrito-federal",
"durango",
"guanajuato",
"guerrero",
"hidalgo",
"jalisco",
"mexico",
"michoacan",
"morelos",
"nayarit",
"nuevo-leon",
"oaxaca",
"puebla",
"queretaro",
"quintana-roo",
"san-luis-potosi",
"sinaloa",
"sonora",
"tabasco",
"tamaulipas",
"tlaxcala",
"veracruz",
"yucatan",
"zacatecas"
]
},
"postalCode": {
"type": "string",
"maxLength": 10
}
}
},
{
"properties": {
"country": {
"type": "string",
"enum": ["USA"]
},
"state": {
"type": "string",
"enum": [
"AL",
"AK",
"AS",
"AZ",
"AR",
"AA",
"AE",
"AP",
"CA",
"CO",
"CT",
"DE",
"DC",
"FM",
"FL",
"GA",
"GU",
"HI",
"ID",
"IL",
"IN",
"IA",
"KS",
"KY",
"LA",
"ME",
"MH",
"MD",
"MA",
"MI",
"MN",
"MS",
"MO",
"MT",
"NE",
"NV",
"NH",
"NJ",
"NM",
"NY",
"NC",
"ND",
"MP",
"OH",
"OK",
"OR",
"PW",
"PA",
"PR",
"RI",
"SC",
"SD",
"TN",
"TX",
"UT",
"VT",
"VI",
"VA",
"WA",
"WV",
"WI",
"WY"
]
},
"postalCode": {
"type": "string",
"maxLength": 10
}
}
},
{
"properties": {
"country": {
"not": {
"type": "string",
"enum": ["CAN", "MEX", "USA"]
}
},
"state": {
"type": "string",
"maxLength": 51
},
"postalCode": {
"type": "string",
"maxLength": 51
}
}
}
],
"properties": {
"street": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"street2": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"city": {
"type": "string",
"minLength": 1,
"maxLength": 51
}
}
},
"bankAccount": {
"type": "object",
"properties": {
"accountType": {
"type": "string",
"enum": ["checking", "savings"]
},
"routingNumber": {
"type": "string",
"pattern": "^\\d{9}$"
},
"accountNumber": {
"type": "string"
}
}
},
"date": {
"pattern": "^(\\d{4}|XXXX)-(0[1-9]|1[0-2]|XX)-(0[1-9]|[1-2][0-9]|3[0-1]|XX)$",
"type": "string"
},
"email": {
"type": "string",
"maxLength": 256,
"format": "email"
},
"fullName": {
"type": "object",
"properties": {
"first": {
"type": "string",
"minLength": 1,
"maxLength": 30
},
"middle": {
"type": "string"
},
"last": {
"type": "string",
"minLength": 1,
"maxLength": 30
},
"suffix": {
"type": "string",
"enum": ["Jr.", "Sr.", "II", "III", "IV"]
}
},
"required": ["first", "last"]
},
"usaPhone": {
"type": "string",
"pattern": "^\\d{10}$"
},
"ssn": {
"type": "string",
"pattern": "^[0-9]{9}$"
},
"privacyAgreementAccepted": {
"type": "boolean",
"enum": [true]
},
"usaStates": {
"type": "string",
"enum": [
"AL",
"AK",
"AS",
"AZ",
"AR",
"AA",
"AE",
"AP",
"CA",
"CO",
"CT",
"DE",
"DC",
"FM",
"FL",
"GA",
"GU",
"HI",
"ID",
"IL",
"IN",
"IA",
"KS",
"KY",
"LA",
"ME",
"MH",
"MD",
"MA",
"MI",
"MN",
"MS",
"MO",
"MT",
"NE",
"NV",
"NH",
"NJ",
"NM",
"NY",
"NC",
"ND",
"MP",
"OH",
"OK",
"OR",
"PW",
"PA",
"PR",
"RI",
"SC",
"SD",
"TN",
"TX",
"UT",
"VT",
"VI",
"VA",
"WA",
"WV",
"WI",
"WY"
]
}
},
"properties": {
"veteranFullName": {
"$ref": "#/definitions/fullName"
},
"dateOfBirth": {
"$ref": "#/definitions/date"
},
"veteranSocialSecurityNumber": {
"$ref": "#/definitions/ssn"
},
"email": {
"$ref": "#/definitions/email"
},
"mobilePhone": {
"$ref": "#/definitions/usaPhone"
},
"alternatePhone": {
"$ref": "#/definitions/usaPhone"
},
"address": {
"$ref": "#/definitions/address"
},
"bankAccount": {
"$ref": "#/definitions/bankAccount"
},
"hasSelectedProgram": {
"type": "boolean"
},
"providerName": {
"type": "string"
},
"programName": {
"type": "string"
},
"programCity": {
"type": "string"
},
"programState": {
"type": "string"
},
"learningFormat": {
"type": "string",
"enum": ["inPerson", "online", "onlineAndInPerson"]
},
"vrrapConfirmation": {
"type": "boolean"
},
"privacyAgreementAccepted": {
"$ref": "#/definitions/privacyAgreementAccepted"
}
},
"required": [
"veteranFullName",
"dateOfBirth",
"veteranSocialSecurityNumber",
"email",
"privacyAgreementAccepted"
]
}