Skip to content

Commit

Permalink
Merge pull request #2126 from bcgov/feature/AddErrorHandlingStudentReg
Browse files Browse the repository at this point in the history
Adds validation issue handling to student reg edit
  • Loading branch information
arcshiftsolutions authored Jan 10, 2025
2 parents 7e16f1d + 9062d9a commit c5e1c15
Show file tree
Hide file tree
Showing 2 changed files with 269 additions and 240 deletions.
12 changes: 7 additions & 5 deletions backend/src/validations/eas.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,31 @@ const { baseRequestSchema } = require('./base');

const putStudentAssessmentSchema = object({
body: object({
assessmentStudentID: string().nullable().optional,
assessmentStudentID: string().nonNullable(),
sessionID:string().nonNullable(),
districtID: string().nonNullable(),
districtID: string().nullable().optional(),
schoolID: string().nonNullable(),
assessmentCenterID: string().nullable().optional(),
assessmentCenterID: string().nonNullable(),
assessmentID:string().nonNullable(),
assessmentTypeCode: string().nonNullable(),
studentID: string().nonNullable(),
pen: string().max(9).nonNullable(),
localID: string().max(12).nonNullable(),
givenName: string().max(25).nonNullable(),
surName: string().max(25).nonNullable(),
isElectronicExam: boolean().nonNullable(),
isElectronicExam: boolean().nullable().optional(),
proficiencyScore: number().nullable().optional(),
provincialSpecialCaseCode: string().max(1).nullable().optional(),
courseStatusCode: string().max(1).nullable().optional(),
numberOfAttempts: number().nullable(),
numberOfAttempts: number().nullable().optional(),
courseMonth: number().optional(),
courseYear: number().optional(),
assessmentStudentValidationIssues: array().of(object({
assessmentStudentValidationIssueID:string().nullable().optional(),
assessmentStudentID:string().nullable().optional(),
validationIssueSeverityCode:string().nullable().optional(),
validationIssueCode:string().nullable().optional(),
validationIssueFieldCode:string().nullable().optional(),
validationLabel:string().nullable().optional(),
validationMessage:string().nullable().optional(),
}).concat(baseRequestSchema)).nullable().optional()
Expand Down
Loading

0 comments on commit c5e1c15

Please sign in to comment.