Closed
Description
When dealing with polymorphic data and using the remap functions it'd be nice to have a oneOf
validator. It'd take as argument keys of the formGroup
so it'd also be type safe.
And it could look like the following:
public getFormGroupControlOptions(): FormGroupOptions<YourPolymorphicForm> {
return {
validators: [NgxSubFormValidators.OneOf('prop1', 'prop2', 'prop3')],
};
}