Skip to content

Commit

Permalink
Updated validation checks on FE/BE
Browse files Browse the repository at this point in the history
  • Loading branch information
wilwong89 committed Feb 7, 2025
1 parent 010160a commit fc90654
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/src/validators/ats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const clientBody = {

const atsEnquirySubmissionFields = {
addedToATS: Joi.boolean().required(),
atsClientNumber: Joi.number().allow(null).max(999999)
atsClientNumber: Joi.number().integer().min(0).max(999999).allow(null)
};

const schema = {
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/components/housing/enquiry/EnquiryForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Form } from 'vee-validate';
import { computed, onMounted, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { date, mixed, number, object, string } from 'yup';
import { boolean, date, mixed, number, object, string } from 'yup';
import {
CancelButton,
Expand Down Expand Up @@ -94,7 +94,8 @@ const intakeSchema = object({
.label('Assigned to'),
applicationStatus: string().oneOf(APPLICATION_STATUS_LIST).label('Activity state'),
waitingOn: string().notRequired().max(255).label('waiting on'),
atsClientNumber: number().max(999999).notRequired()
addedToATS: boolean().required().label('Authorized Tracking System (ATS) updated'),
atsClientNumber: number().min(0).max(999999).notRequired().label('ATS Client #')
});
// Actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const formSchema = object({
naturalDisaster: string().oneOf(YES_NO_LIST).required().label('Affected by natural disaster'),
projectLocationDescription: string().notRequired().max(4000).label('Additional information about location'),
addedToATS: boolean().required().label('Authorized Tracking System (ATS) updated'),
atsClientNumber: number().notRequired().max(999999).label('ATS Client #'),
atsClientNumber: number().notRequired().min(0).max(999999).label('ATS Client #'),
ltsaCompleted: boolean().required().label('Land Title Survey Authority (LTSA) completed'),
bcOnlineCompleted: boolean().required().label('BC Online completed'),
aaiUpdated: boolean().required().label('Authorization and Approvals Insight (AAI) updated'),
Expand Down

0 comments on commit fc90654

Please sign in to comment.