FormBuilderValidators.equal() not working with form state? #61
-
Using FormBuilderTextField(
name: 'password',
decoration: InputDecoration(labelText: 'Password'),
obscureText: true,
validator: FormBuilderValidators.compose([
FormBuilderValidators.required(),
FormBuilderValidators.minLength(6)
])),
FormBuilderTextField(
name: 'confirmPassword',
decoration: InputDecoration(labelText: 'Confirm Password'),
obscureText: true,
validator: FormBuilderValidators.compose([
FormBuilderValidators.required(),
FormBuilderValidators.minLength(6),
(value) {
print(
"value: $value matches ${_formKey.currentState?.instantValue['password']}");
return null;
},
FormBuilderValidators.equal(
_formKey.currentState?.instantValue['password'] ?? '',
errorText: 'Passwords do not match')
])), the "custom" validator works fine, but |
Beta Was this translation helpful? Give feedback.
Answered by
deandreamatias
Sep 15, 2023
Replies: 1 comment
-
I will close because create a issue #63 , but is a interesting bug |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
orbiteleven
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I will close because create a issue #63 , but is a interesting bug