S
S
sinevik2021-08-16 19:57:21
Mongoose
sinevik, 2021-08-16 19:57:21

Why does unnecessary validation work?

phone: {
    type: Array,
    validate(value) {
      validation.checkPhone(value);
    },
  },

If Array is specified in the type schema and the property required: true was previously set, then even after I remove this property, does the validation still work? Does anyone know why?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question