IFSC Field Testing #1
This commit is contained in:
@@ -313,12 +313,14 @@ final _ifscFieldKey = GlobalKey<FormFieldState>();
|
||||
_validateIFSC();
|
||||
},
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
final trimmed = value.trim().toUpperCase();
|
||||
if (trimmed.length < 11) {
|
||||
// clear bank/branch if backspace or changed
|
||||
bankNameController.clear();
|
||||
branchNameController.clear();
|
||||
}
|
||||
});
|
||||
},
|
||||
validator: (value) {
|
||||
final pattern = RegExp(r'^[A-Z]{4}0[A-Z0-9]{6}$');
|
||||
@@ -393,7 +395,7 @@ final _ifscFieldKey = GlobalKey<FormFieldState>();
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
onPressed: _isValidating
|
||||
onPressed: _isValidating || ifscController.text.length != 11
|
||||
? null
|
||||
: () {
|
||||
final isAccountValid =
|
||||
|
||||
@@ -505,12 +505,14 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
_validateIFSC();
|
||||
},
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
final trimmed = value.trim().toUpperCase();
|
||||
if (trimmed.length < 11) {
|
||||
// clear bank/branch if backspace or changed
|
||||
bankNameController.clear();
|
||||
branchNameController.clear();
|
||||
}
|
||||
});
|
||||
},
|
||||
validator: (value) {
|
||||
final pattern = RegExp(r'^[A-Z]{4}0[A-Z0-9]{6}$');
|
||||
@@ -613,7 +615,7 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
onPressed: _isValidating
|
||||
onPressed: _isValidating || ifscController.text.length != 11
|
||||
? null
|
||||
: () {
|
||||
if (confirmAccountNumberController.text ==
|
||||
|
||||
Reference in New Issue
Block a user