Introduction
Here is a validation code for bank IFSC code.
IFSC code format :
- Starting 4 should be only alphabets[A-Z]
- Remaining 7 should be accepting only alphanumeric
Code
Here is a validation code for bank IFSC code.
IFSC code format :
- Starting 4 should be only alphabets[A-Z]
- Remaining 7 should be accepting only alphanumeric
Code
- <script type="text/javascript">
- $(document).ready(function(){
- $(".ifsc").change(function () {
- var inputvalues = $(this).val();
- var reg = /[A-Z|a-z]{4}[0][a-zA-Z0-9]{6}$/;
- if (inputvalues.match(reg)) {
- return true;
- }
- else {
- $(".ifsc").val("");
- alert("You entered invalid IFSC code");
- //document.getElementById("txtifsc").focus();
- return false;
- }
- });
- });
- </script>
- IFSC : <input type="text" class="ifsc">
nice article.
ReplyDeleteThanks
Delete