npm fluentvalidation-ts 1.2.1
v1.2.1

latest releases: 3.2.0, 3.1.0, 3.0.2...
4 years ago

Updates the validatorProducer argument of the setValidator rule so that it can optionally take the base model being validated.

This change allows nested validators to depend on the state of the base model, by accepting the base model as a constructor argument.

Example:

this.ruleFor('nestedProperty')
  .setValidator(baseModel => new NestedValidator(baseModel));

Don't miss a new fluentvalidation-ts release

NewReleases is sending notifications on new releases.