allow FormFieldState
the option to not validate initially when autoValidate
is True. #48876
Description
Use case
When FormFieldState
has autoValidate
as true
, it will validate upon build
.
See: https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/form.dart#L419
This is a different behaviour than FormState
when autoValidate
is set to true
where each individual field won't be validated upon build.
However, even when FormState
's autoValidate
is set to true
, if a FormField
has autoValidate
set to true
, then that FormField
will be validated upon build.
Proposal
Since this might be a breaking changes for people who depends on validation upon build, I suggest to add an option to opt out for validation upon build on FormFieldState
.
However, if we are okay with breaking build, it would be better if we can standardise the behaviour between FormFieldState
and FormState
.