Skip to content

Commit

Permalink
🐛 Applied AutoValidate appropriately
Browse files Browse the repository at this point in the history
- Applied `autovalidateMode` to all `TextFormField` as per the value of `widget.autovalidateMode`.
  • Loading branch information
aditya-css committed Sep 28, 2023
1 parent 71f4b51 commit e28554e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 3 additions & 0 deletions lib/credit_card_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ class _CreditCardFormState extends State<CreditCardForm> {
color: widget.textColor,
),
decoration: widget.expiryDateDecoration,
autovalidateMode: widget.autovalidateMode,
keyboardType: TextInputType.number,
textInputAction: TextInputAction.next,
autofillHints: const <String>[
Expand Down Expand Up @@ -381,6 +382,7 @@ class _CreditCardFormState extends State<CreditCardForm> {
),
decoration: widget.cvvCodeDecoration,
keyboardType: TextInputType.number,
autovalidateMode: widget.autovalidateMode,
textInputAction: widget.isHolderNameVisible
? TextInputAction.next
: TextInputAction.done,
Expand Down Expand Up @@ -429,6 +431,7 @@ class _CreditCardFormState extends State<CreditCardForm> {
),
decoration: widget.cardHolderDecoration,
keyboardType: TextInputType.text,
autovalidateMode: widget.autovalidateMode,
textInputAction: TextInputAction.done,
autofillHints: const <String>[AutofillHints.creditCardName],
onEditingComplete: () {
Expand Down

0 comments on commit e28554e

Please sign in to comment.