ngx-sub-form icon indicating copy to clipboard operation
ngx-sub-form copied to clipboard

refactor(oneOf validator): Refactor oneOf validator

Open zakhenry opened this issue 5 years ago • 3 comments

... to be less tied to ngx-subform implementation. Restructured errors for oneOf behaviour to be explicitly named rather than implicit by array index location

zakhenry avatar Aug 29 '19 22:08 zakhenry

This is still WIP, opened for discussion

zakhenry avatar Aug 29 '19 22:08 zakhenry

One other thought I had - is this even a good idea to have in this package?

I’m wondering if we should create a NgxFormGroupValidators package? It really feels like a distinct package and I can already think of a few cases we would want already:

  • oneOf (polymorphism)
  • equals (password creation)
  • greaterThan (min/max fields)
  • ordered (drawing tool profiles)

zakhenry avatar Aug 30 '19 07:08 zakhenry

discussed offline with @zakhenry:

  • can't really do a oneOf pattern without ngx sub form anyway :shrug:
  • easy to make a breaking change later on if we move that to a separate repo

So all good to have that on ngx sub form :+1:

maxime1992 avatar Apr 22 '20 14:04 maxime1992