@eeplatform/basic-edu 1.10.31 → 1.10.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -2970,7 +2970,9 @@ var learnerInfoSchema = Joi5.object({
2970
2970
  firstName: Joi5.string().required(),
2971
2971
  middleName: Joi5.string().optional().allow("", null),
2972
2972
  extensionName: Joi5.string().optional().allow("", null),
2973
- birthDate: Joi5.string().required(),
2973
+ birthDate: Joi5.string().regex(/^\d{2}-\d{2}-\d{4}$/).required().messages({
2974
+ "string.pattern.base": "Birth date must be in the format DD-MM-YYYY"
2975
+ }),
2974
2976
  sex: Joi5.string().required(),
2975
2977
  // Changed to accept any string to match frontend
2976
2978
  age: Joi5.number().integer().min(0).max(150).required(),
@@ -3138,6 +3140,7 @@ function MLearner(value) {
3138
3140
  throw new BadRequestError8("Invalid specialProgram format");
3139
3141
  }
3140
3142
  }
3143
+ value.learnerInfo.birthDate = new Date(value.learnerInfo.birthDate);
3141
3144
  return {
3142
3145
  _id: value._id ?? void 0,
3143
3146
  region: value.region,