PackageGenerator icon indicating copy to clipboard operation
PackageGenerator copied to clipboard

Export validation rule methods from generated classes?

Open mikaelcom opened this issue 7 years ago • 0 comments

Two generated validation methods (union, list and array rules) have been added to the generated classes:

  • union: validate{parameterName}ForUnionConstraintsFrom{setterMethodName}
  • list, array: validate{parameterName}ArrayValuesFrom{setterMethodName}
  • choice, array: validate{parameterName}ForChoiceConstraintsFrom{setterMethodName}

Wouldn't it be better to extract them from the geenerated classes to the PackageBase project into a limited number of generic validation methods?

This way, it would be easier to implement new validation rules without having to update the generated classes nor the generator's validation rules.

mikaelcom avatar Jan 23 '19 22:01 mikaelcom