I need to create a regex to match this format: B001169875
Can someone help me?
Trying to make it work using jQuery Validate custom method:
jQuery.validator.addMethod("brandnumber", function(value, element) {
return /B\d{9}/m.test(value);
}, "Account number must start with B and be followed by 9 numbers.");
If it always starts with a
Band is followed by 9 numbers then this will do it:And you could use it like this (depending on how you want to use it):