Closed TortillaZHawaii closed 9 months ago
hi. thanks for the reproduction will check
for now you can do
const loginMustMatchValidator = MyMustMatchValidator(
controlName: 'password',
matchingControlName: 'confirmPassword',
);
@RfGroup(validators: [
loginMustMatchValidator,
])
fixed in reactive_forms_generator 4.0.2
Hi @TortillaZHawaii! Your issue has been closed. If we were helpful don't forget to star the repo.
Please check our reactive_forms_widget package
We would appreciate sponsorship subscription or one time donation https://github.com/sponsors/artflutter
Thanks!
I tried to create a group wide validator similar to what was found in https://github.com/artflutter/reactive_forms_generator/blob/master/packages/reactive_forms_generator/example/lib/docs/login_extended/login_extended.dart example.
However it seems that
RfGroup
validators aren't passed to generated classes.Repo with recreated bug: https://github.com/TortillaZHawaii/reactive_forms_bug. I am using latest versions:
File lib/login.dart contains
MyMustMatchValidator
, but it isn't seen anywhere in generated lib/login.gform.dart file.I found a workaround that requires manually copying validators from
RfGroup
toformElements
method in generated file.