FormBuilderTextField(
name: 'middle_name',
initialValue: context.store.middleName,
autocorrect: false,
autofillHints: const [AutofillHints.middleName],
inputFormatters: [
LengthLimitingTextInputFormatter(64),
],
textCapitalization: TextCapitalization.words,
decoration: const InputDecoration(
labelText: 'Middle name(s)',
hintMaxLines: 1,
),
validator: FormBuilderValidators.compose([
FormBuilderValidators.maxLength(64),
]),
textInputAction: TextInputAction.next,
onSubmitted: (_) => debugPrint('onSubmitted'),
);
Is there an existing issue for this?
Package/Plugin version
11.0.0
Platforms
Flutter doctor
Flutter doctor
Minimal code example
Code sample
Current Behavior
With v11 this field became required even though
FormBuilderValidators.required()was not one of the validators.Expected Behavior
Before v11 this field was not required and would allow the user to skip it.
Steps To Reproduce
Aditional information
With regards to the breaking changes in v11, I would have thought that non-required fields would have behaved the same.
Does this now mean that
checkNullOrEmptyeffectively replacesFormBuilderValidators.required()? If so, could the documentation highlight this change?