Просмотр исходного кода

chore: updates validation error message

e22m4u 3 месяцев назад
Родитель
Сommit
b624f640fd

+ 1 - 1
dist/cjs/index.cjs

@@ -3239,7 +3239,7 @@ var init_model_data_validator = __esm({
         const validateDef = propDef.validate;
         const validatorRegistry = this.getService(PropertyValidatorRegistry);
         const createError = /* @__PURE__ */ __name((validatorName) => new InvalidArgumentError(
-          "The property %v of the model %v has an invalid value %v that caught by the validator %v.",
+          "The property %v of the model %v has the invalid value %v that caught by the validator %v.",
           propName,
           modelName,
           propValue,

+ 1 - 1
src/definition/model/model-data-validator.js

@@ -184,7 +184,7 @@ export class ModelDataValidator extends Service {
     const validatorRegistry = this.getService(PropertyValidatorRegistry);
     const createError = validatorName =>
       new InvalidArgumentError(
-        'The property %v of the model %v has an invalid value %v ' +
+        'The property %v of the model %v has the invalid value %v ' +
           'that caught by the validator %v.',
         propName,
         modelName,

+ 3 - 3
src/definition/model/model-data-validator.spec.js

@@ -2217,7 +2217,7 @@ describe('ModelDataValidator', function () {
                 foo: 'test',
               });
             expect(throwable).to.throw(
-              'The property "foo" of the model "model" has an invalid value "test" ' +
+              'The property "foo" of the model "model" has the invalid value "test" ' +
                 'that caught by the validator "myValidator".',
             );
           };
@@ -2434,7 +2434,7 @@ describe('ModelDataValidator', function () {
                 foo: 'test',
               });
             expect(throwable).to.throw(
-              'The property "foo" of the model "model" has an invalid value "test" ' +
+              'The property "foo" of the model "model" has the invalid value "test" ' +
                 'that caught by the validator "myValidator2".',
             );
           };
@@ -2670,7 +2670,7 @@ describe('ModelDataValidator', function () {
                 foo: 'test',
               });
             expect(throwable).to.throw(
-              'The property "foo" of the model "model" has an invalid value "test" ' +
+              'The property "foo" of the model "model" has the invalid value "test" ' +
                 'that caught by the validator "myValidator2".',
             );
           };