I'm using the latest version of the Jquery Validation plugin which has support for validating BIC and IBAN numbers. This is part of the additional methods js which I've included and is working fine for validating IBANs, however, it fails when validating BICs. When I say fails I mean the call to validate doesn't work, not that it's incorrectly validating the BIC sequence.
Here's my code:
<asp:TextBox runat="server" ID="txtBIC" CssClass="donBic" AutoComplete="off"></asp:TextBox>
And here's my Jquery
$('.donBic').rules('add', {
bic: true
});
I have to presume the 'bic' usage isn't the correct way to call that form of validation, yet this code works perfectly well for validating IBANS:
<asp:TextBox runat="server" ID="txtIBAN" CssClass="donIban" AutoComplete="off"></asp:TextBox>
$('.donIban').rules('add', {
iban: true
});
Does anyone know the correct way to call BIC validation?
As for your comment (@Full Time Skeleton) that there's no BIC method, here's how you can add it:
Add this to your onReady event handler:
You can find the documentation page for addMethod here