Validate IFSC format offline
ifsc_validateValidate IFSC codes offline against RBI structure rules without network calls. Reject malformed codes early and explain why a code is invalid.
Instructions
Check whether a string is structurally a valid IFSC, without any network call.
Applies the RBI/NEFC layout rules offline: exactly 11 characters, 4 leading letters for the bank code, a literal '0' as the 5th character, and 6 trailing alphanumeric branch characters.
Choose this over ifsc_lookup when you want to reject junk before spending a
request, or to explain why a user-entered code is wrong. It does NOT confirm
the branch exists - only ifsc_lookup does that.
Returns ok: true with: input, normalized, is_valid, bank_code, branch_code,
reason and message. reason is a stable code: VALID, EMPTY, WRONG_LENGTH,
INVALID_CHARACTERS, BAD_BANK_CODE, MISSING_BANK_SUBLET or BAD_BRANCH_CODE.
Args: ifsc: The candidate string to validate.
Returns:
A validation report, always with ok: true - an invalid IFSC is a
successful report, not an error.
Example:
Ask "is HFDCC00001 a valid IFSC?" -> call ifsc_validate("HFDCC00001") and
read reason == "MISSING_BANK_SUBLET".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ifsc | Yes | The candidate IFSC string to check, e.g. 'HDFC0000001' or a messy user-typed value like ' hdfc 0000001 '. Case and whitespace are normalised before checking. May be empty - an empty value is a reportable result (reason EMPTY), not an error. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||