Skip to content

Commit

Permalink
Merge pull request #6533 from opencrvs/configurable-address-select-va…
Browse files Browse the repository at this point in the history
…lidation-fix

Allow configurable location levels in config validator
  • Loading branch information
euanmillar committed Feb 20, 2024
2 parents 7488c57 + c458b82 commit 69e3b77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions development-environment/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ elif $services; then
fi

echo
echo -e "This command starts the OpenCRVS Core development environment, which consists of multiple NodeJS microservices running in parallel. OpenCRVS requires a companion country configuration server to also be running. \n\nIf you ran our setup command, the country configuration server exists in the directory opencrvs-countryconfig alongside this directory, otherwise you may have cloned or forked it somewhere else.\n\nSo, before we start...\n\n1. Copy this command: \033[32myarn dev \033[0m\n\n2. Create another terminal window.\n\n3. cd into your country config directory and prepare to run the command in that terminal window \033[32mWHEN OPENCRVS CORE HAS FULLY STARTED UP\033[0m\n\nin order to start the country config server and be able to use OpenCRVS.\n\nOpenCRVS has started up fully when the terminal logs slow and stop. \n\nBrowse to this URL in Chrome to check the status:\033[32m\n\nhttps://is-my-opencrvs-up.netlify.app\033[0m \n\nIf your OpenCRVS database is not seeded, open another terminal window and cd into opencrvs-core. Run this command in the opencrvs-core directory \033[32mWHEN OPENCRVS CORE HAS FULLY STARTED UP\033[0m in order to seed the database with data: \033[32m\n\nyarn seed:dev\033[0m\n\n"
echo -e "This command starts the OpenCRVS Core development environment, which consists of multiple NodeJS microservices running in parallel on many ports. OpenCRVS requires a companion country configuration server to also be running. \n\nIf you ran our setup command, the country configuration server exists in the directory opencrvs-countryconfig alongside this directory, otherwise you may have cloned or forked it somewhere else.\n\nSo, before we start...\n\n1. Copy this command: \033[32myarn dev \033[0m\n\n2. Create another terminal window.\n\n3. cd into your country config directory and prepare to run the command in that terminal window \033[32mWHEN OPENCRVS CORE HAS FULLY STARTED UP\033[0m\n\nin order to start the country config server and be able to use OpenCRVS.\n\nOpenCRVS has started up fully when the terminal logs slow and stop. \n\nBrowse to this URL in Chrome to check the status:\033[32m\n\nhttps://is-my-opencrvs-up.netlify.app\033[0m \n\nIf your OpenCRVS database is not seeded, open another terminal window and cd into opencrvs-core. Run this command in the opencrvs-core directory \033[32mWHEN OPENCRVS CORE HAS FULLY STARTED UP\033[0m in order to seed the database with data: \033[32m\n\nyarn seed:dev\033[0m\n\n"
echo

sleep 3
Expand Down Expand Up @@ -110,7 +110,7 @@ done
echo
echo -e "\033[32m:::::::::: STARTING OPENCRVS ::::::::::\033[0m"
echo
echo "If you did not previously run our setup command, Docker is downloading Mongo DB, ElasticSearch, OpenHIM and Hearth docker images. These are large files. Then docker will build them. If you did run our setup command, OpenCRVS will start much faster. Wait for the OpenCRVS client app to build completely (output will stop and you will see the message: @opencrvs/client: Compiled with warnings.), then OpenCRVS Core will be available."
echo "If you did not previously run our setup command, Docker is downloading Mongo DB, ElasticSearch, OpenHIM and Hearth docker images. These are large files. Then docker will build them. If you did run our setup command, OpenCRVS will start much faster. Wait for the OpenCRVS stack to start up completely (output will slow and gradually stop ...), then OpenCRVS Core will be available."
echo
echo -e "\033[32m:::::::::: PLEASE WAIT for @opencrvs/client ::::::::::\033[0m"
echo
Expand Down
6 changes: 6 additions & 0 deletions packages/config/src/handlers/forms/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ const REQUIRED_PRIMARY_ADDRESS_FIELDS = ['countryPrimary', 'statePrimary']

const OPTIONAL_EVENT_ADDRESS_FIELDS = [
'district',
'locationLevel3',
'locationLevel4',
'locationLevel5',
'ruralOrUrban',
'city',
'addressLine3UrbanOption',
Expand All @@ -121,6 +124,9 @@ const OPTIONAL_EVENT_ADDRESS_FIELDS = [

const OPTIONAL_PRIMARY_ADDRESS_FIELDS = [
'districtPrimary',
'locationLevel3Primary',
'locationLevel4Primary',
'locationLevel5Primary',
'ruralOrUrbanPrimary',
'cityPrimary',
'addressLine3UrbanOptionPrimary',
Expand Down

0 comments on commit 69e3b77

Please sign in to comment.