Created
October 25, 2022 13:34
-
-
Save appletreeat56/17f32460c504bdefbca67fc992f6b6a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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