Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export validation rule methods from generated classes? #175

Open
mikaelcom opened this issue Jan 23, 2019 · 0 comments
Open

Export validation rule methods from generated classes? #175

mikaelcom opened this issue Jan 23, 2019 · 0 comments
Assignees

Comments

@mikaelcom
Copy link
Member

mikaelcom commented Jan 23, 2019

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 mikaelcom self-assigned this Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant