martinlabuschin
9/7/2017 - 9:13 AM

Order ID validator

protected $wrongFormats = array(
        '/^(.){0,1}$/', //order id should be minimum 2 chars long
        '/^([a-zA-Z])\\1{4,}+$/', //matches repeating letter if longer 5
        '/^([\\?#!.,\-\[\]\^\$\'\"])\\1{2,}+$/', //matches specials chars repeat longer 2: #!.,-?[]^$'
        '/^[\pM\p{Nl}\p{P}\p{Pc}\p{S}]+$/', //matches if contains of special characters only
        '/\b(keine)\b/', //matches exact word
        '/\b(none)\b/', //matches exact word
        '/\b(leer)\b/', //matches exact word
        '/\b(nix)\b$/', //matches exact word
        '/\b(nichts)\b/', //matches exact word
        '/\b(unbekannt)\b/', //matches exact word
        '/\b(nicht bekannt)\b/', //matches exact word
        '/\b(0815)\b$/',
        '/^([0-9])\\1{3,}+$/', //matches minimum of four same digits
        '/[@]/', //matches if there is @ symbol inside
        '/\b(nicht zur hand)\b/', //matches exact word
        '/\b(weiß ich nicht mehr)\b/', //matches exact word
        '/\b(vergessen)\b/', //matches exact word
        '/\b(nicht mehr vorhanden)\b/', //matches exact word
        '/\b(nicht mehr bekannt)\b/', //matches exact word
        '/\b(habe ich nicht mehr)\b/', //matches exact word
        '/\b(je ne sais plus)\b/', //matches exact word
        '/\b(unbekannt)\b/', //matches exact word
        '/\b(nie pamietam)\b/', //matches exact word
        '/\b(keine Ahnung)\b/', //matches exact word
        '/\b(nicht bekannt)\b/', //matches exact word
        '/\b(weiß nicht mehr)\b/', //matches exact word
        '/\b(kein)\b/', //matches exact word
        '/\b(keine)\b/', //matches exact word
        '/\b(vergessen)\b/', //matches exact word
        '/\b(verloren)\b/', //matches exact word
        '/\b(asdf)\b$/', //matches exact word
        '/\b(asdfgh)\b$/', //matches exact word
        '/\b(qwertz)\b$/', //matches exact word
        '/\b(qwerty)\b$/', //matches exact word
        '/^-\d{0,}$/', //matches exact word
        '/\b(orderid)\b$/', //matches exact word
        '/\b(bestellnummer)\b$/', //matches exact word
        '/\b(diverse)\b/', //matches exact word
        '/\b(mehrere)\b/', //matches exact word
        '/\b(mehr)\b/', //matches exact word
        '/\b(ebay)\b$/', //matches exact word
        '/\b(amazon)\b$/', //matches exact word
        '/\b(xxxxx)\b$/', //matches exact word
        '/\b(n\/a)\b$/', //matches exact word
        '/^k\.a$/', //matches exact word
        '/\b(na)\b$/', //matches exact word
        '/\b(mehr)\b/', //matches exact word,
        '/^(?=(.*\s){1,})[\p{L}!? ]+$/u', // only letters and at least one space
        '/^(?:0(?=1|$))?(?:1(?=2|$))?(?:2(?=3|$))?(?:3(?=4|$))?(?:4(?=5|$))?(?:5(?=6|$))?(?:6(?=7|$))?(?:7(?=8|$))?(?:8(?=9|$))?(?:9$)?$/'
    );