IFSC Field Testing #1

This commit is contained in:
2025-09-16 12:40:46 +05:30
parent db39cfbcc9
commit d2044d49b5
2 changed files with 37 additions and 33 deletions

View File

@@ -505,13 +505,15 @@ 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}$');
if (value == null || value.trim().isEmpty) {
@@ -613,18 +615,18 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
child: SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: _isValidating
? null
: () {
if (confirmAccountNumberController.text ==
accountNumberController.text) {
_validateBeneficiary();
} else {
setState(() {
_validationError =
AppLocalizations.of(context)
.accountMismatch;
});
onPressed: _isValidating || ifscController.text.length != 11
? null
: () {
if (confirmAccountNumberController.text ==
accountNumberController.text) {
_validateBeneficiary();
} else {
setState(() {
_validationError =
AppLocalizations.of(context)
.accountMismatch;
});
}
},
child: _isValidating