PO Box Regular Expression Validation

前端 未结 11 2198
攒了一身酷
攒了一身酷 2020-12-05 03:19

Here\'s my code, but I can\'t ever trigger the alert.

$(document).ready( function (){
    $(\"[id*=\'txtAddress1S\']\").blur(function() {
        var pattern         


        
11条回答
  •  半阙折子戏
    2020-12-05 04:11

    This one is working pretty well for us. (php preg_match)

    $pattern = '!p(ost)?\.?\s*o(ffice)?\.?(box|\s|$)!i';
    

提交回复
热议问题