Hozifa Elgherbawy commited on
Commit
0a5775b
·
unverified ·
2 Parent(s): 29caec6 14766f6

Merge pull request #33 from Modarb-Ai-Trainer:workout_frequency

Browse files
src/common/validations/user-register.validation.ts CHANGED
@@ -125,9 +125,8 @@ export const userRegisterKeys = {
125
  "any.required": "target_weight must be entered",
126
  "number.empty": "target_weight cannot be empty",
127
  }),
128
- workout_frequency: joi.number().empty().required().messages({
129
  "number.base": "please enter a valid workout_frequency number",
130
- "any.required": "workout_frequency must be entered",
131
  "number.empty": "workout_frequency cannot be empty",
132
  }),
133
  preferred_days: joi
 
125
  "any.required": "target_weight must be entered",
126
  "number.empty": "target_weight cannot be empty",
127
  }),
128
+ workout_frequency: joi.number().empty().optional().messages({
129
  "number.base": "please enter a valid workout_frequency number",
 
130
  "number.empty": "workout_frequency cannot be empty",
131
  }),
132
  preferred_days: joi