Skip to content

Instantly share code, notes, and snippets.

@ldodds
Created June 2, 2015 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ldodds/b0ae664e623ec62f595c to your computer and use it in GitHub Desktop.
Save ldodds/b0ae664e623ec62f595c to your computer and use it in GitHub Desktop.
Fixed up schema from csvlint bug report
{
"fields": [
{
"name": "Store Code",
"constraints": {
"required": true,
"type": "http://www.w3.org/TR/xmlschema-2/#string",
"unique": true,
"maxLength": 10
}
},
{
"name": "Name",
"title": "Store Name"
},
{
"name": "Address Line 1"
},
{
"name": "Address Line 2"
},
{
"name": "City"
},
{
"name": "State",
"constraints": {
"required": true,
"type": "http://www.w3.org/TR/xmlschema-2/#string",
"maxLength": 2,
"pattern":"[A-Z][A-Z]"
}
},
{
"name": "Postal Code",
"constraints": {
"maxLength": 6,
"pattern":"[0-9]{5}|([A-C]|E|G|H|J-N|P|R-T|V-Z|[0-9]){6}"
}
},
{
"name": "Main Phone",
"constraints": {
"type": "http://www.w3.org/TR/xmlschema-2/#double",
"unique": true,
"maxLength": 10
}
},
{
"name": "Home Page",
"constraints": {
"type": "http://www.w3.org/TR/xmlschema-2/#string",
"unique": true,
"pattern":".*\\/\\?utm_source=google&utm_medium=organic&utm_campaign=localmaps"
}
},
{
"name": "Hours",
"constraints": {
"pattern": "([1-7]:(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9],){0,6}[1-7]:(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment