From e28554e475f214b8be01256251a8db6ea4fe8a39 Mon Sep 17 00:00:00 2001 From: Aditya Chavda Date: Sun, 10 Sep 2023 19:11:25 +0530 Subject: [PATCH] :bug: Applied AutoValidate appropriately - Applied `autovalidateMode` to all `TextFormField` as per the value of `widget.autovalidateMode`. --- CHANGELOG.md | 2 ++ lib/credit_card_form.dart | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8ca10a..021007d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ - Added web support for example app [#148](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/pull/148). - Added card float animation [#144](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/pull/144). - Fixed credit card padding in RTL [#139](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/pull/139). +- Fixed [#138](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/issues/138) + AutoValidateMode only applied to Card Number text field. # [3.0.7](https://github.com/SimformSolutionsPvtLtd/flutter_credit_card/tree/3.0.7) diff --git a/lib/credit_card_form.dart b/lib/credit_card_form.dart index f2da606..80c0d88 100644 --- a/lib/credit_card_form.dart +++ b/lib/credit_card_form.dart @@ -322,6 +322,7 @@ class _CreditCardFormState extends State { color: widget.textColor, ), decoration: widget.expiryDateDecoration, + autovalidateMode: widget.autovalidateMode, keyboardType: TextInputType.number, textInputAction: TextInputAction.next, autofillHints: const [ @@ -381,6 +382,7 @@ class _CreditCardFormState extends State { ), decoration: widget.cvvCodeDecoration, keyboardType: TextInputType.number, + autovalidateMode: widget.autovalidateMode, textInputAction: widget.isHolderNameVisible ? TextInputAction.next : TextInputAction.done, @@ -429,6 +431,7 @@ class _CreditCardFormState extends State { ), decoration: widget.cardHolderDecoration, keyboardType: TextInputType.text, + autovalidateMode: widget.autovalidateMode, textInputAction: TextInputAction.done, autofillHints: const [AutofillHints.creditCardName], onEditingComplete: () {