From 289fc5e3ce56ecb480c328abd5a3d6c6a3dad772 Mon Sep 17 00:00:00 2001 From: horatio Date: Tue, 29 Oct 2024 12:11:15 -0400 Subject: [PATCH] form validations and messaging for dropdowns working as per specs --- .../packages/projects/projects-new-information.hbs | 12 +++++++++++- .../app/validations/submittable-projects-new-form.js | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/client/app/components/packages/projects/projects-new-information.hbs b/client/app/components/packages/projects/projects-new-information.hbs index c69c5328..4f5f0b6e 100644 --- a/client/app/components/packages/projects/projects-new-information.hbs +++ b/client/app/components/packages/projects/projects-new-information.hbs @@ -28,8 +28,12 @@ @placeholder='select a borough' as |borough|> {{borough.label}} + {{#if form.errors.borough}} + {{#each form.errors.borough.validation as |message|}} +
{{message}}
+ {{/each}} + {{/if}} - Applicant Type @@ -48,6 +52,12 @@ @placeholder='select applicant type' as |dcpApplicantType| > {{dcpApplicantType.label}} + {{#if form.errors.applicantType}} + {{#each form.errors.applicantType.validation as |message|}} +
{{message}} +
+ {{/each}} + {{/if}}
{{/let}} diff --git a/client/app/validations/submittable-projects-new-form.js b/client/app/validations/submittable-projects-new-form.js index fa032e3c..f52b9661 100644 --- a/client/app/validations/submittable-projects-new-form.js +++ b/client/app/validations/submittable-projects-new-form.js @@ -120,7 +120,7 @@ export default { message: 'Please select a Borough', }), ], - dcpApplicantType: [ + applicantType: [ validatePresence({ presence: true, message: 'Please select an Applicant Type',