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

validator : add custom unique validator for complex object. #189

Merged
merged 1 commit into from
Jun 17, 2020

Conversation

zannkukai
Copy link
Contributor

This PR adds a custom validator to check if complex object are unique
into an array of objects. Comparing to UniqueValidator from ngx-formly,
this new validator allows to specify which objects keys should be used
to compare if values are unique into an array.

Co-Authored-by: Johnny Mariéthoz Johnny.Mariethoz@rero.ch
Co-Authored-by: Renaud Michotte renaud.michotte@gmail.com

Why are you opening this PR?

  • Which task/US does it implement?
  • Which issue does it fix?

How to test?

  • What command should I have to run to test your PR?
  • What should I test through the UI?

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?
  • Extracted translations?

@zannkukai zannkukai self-assigned this Jun 8, 2020
@zannkukai zannkukai force-pushed the zan-#customValidator branch from 0343fd4 to 3005ff9 Compare June 8, 2020 16:30
@zannkukai zannkukai requested a review from sebdeleze June 9, 2020 07:55
@zannkukai zannkukai marked this pull request as ready for review June 9, 2020 07:55
This PR adds a custom validator to check if complex object are unique
into an array of objects. Comparing to UniqueValidator from ngx-formly,
this new validator allows to specify which objects keys should be used
to compare if values are unique into an array.

Co-Authored-by: Johnny Mariéthoz <Johnny.Mariethoz@rero.ch>
Co-Authored-by: Renaud Michotte <renaud.michotte@gmail.com>
@zannkukai zannkukai force-pushed the zan-#customValidator branch from 3005ff9 to b084fd3 Compare June 10, 2020 07:27
@zannkukai zannkukai requested a review from sebdeleze June 10, 2020 07:28
@zannkukai zannkukai requested review from jma and Garfield-fr June 15, 2020 07:11
@zannkukai zannkukai merged commit bda2c9a into rero:dev Jun 17, 2020
@zannkukai zannkukai deleted the zan-#customValidator branch June 17, 2020 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants