Skip to content

Instantly share code, notes, and snippets.

@appletreeat56
Created October 25, 2022 13:34
Show Gist options
  • Save appletreeat56/17f32460c504bdefbca67fc992f6b6a1 to your computer and use it in GitHub Desktop.
Save appletreeat56/17f32460c504bdefbca67fc992f6b6a1 to your computer and use it in GitHub Desktop.
import {
Schema,
} from 'express-validator'
export const organisationSchema: Schema = {
name: {
notEmpty: true,
errorMessage: 'Name field cannot be empty',
},
category: {
notEmpty: true,
errorMessage: 'Charity category cannot be empty',
},
registrationCode: {
notEmpty: true,
errorMessage: 'Registration Code cannot be empty',
},
"address.country": {
notEmpty: true,
errorMessage: 'Country cannot be empty',
},
"address.postcode": {
notEmpty: true,
errorMessage: 'Postcode cannot be empty',
},
"address.city": {
notEmpty: true,
errorMessage: 'City cannot be empty',
},
"address.addressLine": {
notEmpty: true,
errorMessage: 'Address line cannot be empty',
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment