ngx-sub-form
ngx-sub-form copied to clipboard
refactor(oneOf validator): Refactor oneOf validator
... to be less tied to ngx-subform implementation. Restructured errors for oneOf behaviour to be explicitly named rather than implicit by array index location
This is still WIP, opened for discussion
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)
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: