Skip to content

Commit

Permalink
BIC method: Improve RegEx, {1} is always redundant. Closes gh-744
Browse files Browse the repository at this point in the history
  • Loading branch information
g1smd authored and jzaefferer committed May 20, 2013
1 parent b51e86f commit 5cad6b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion additional-methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ jQuery.validator.addMethod("iban", function(value, element) {
* - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)
*/
jQuery.validator.addMethod("bic", function(value, element) {
return this.optional( element ) || /^([A-Z]{6}[A-Z2-9]{1}[A-NP-Z1-2]{1})(X{3}|[A-WY-Z0-9]{1}[A-Z0-9]{2})?$/.test( value );
return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );
}, "Please specify a valid BIC code");

jQuery.validator.addMethod("dateNL", function(value, element) {
Expand Down

0 comments on commit 5cad6b4

Please sign in to comment.